mirror of
https://github.com/status-im/reagent.git
synced 2025-01-15 06:14:08 +00:00
ed06312eaf
This should make using Reagent with figwheel more convenient (no need for force-update-all). Add a fourth argument to render that controls the updating.
24 lines
509 B
Clojure
24 lines
509 B
Clojure
(ns devsetup
|
|
(:require [demo :as site]
|
|
[runtests]
|
|
[reagent.core :as r]
|
|
[figwheel.client :as fw :include-macros true]))
|
|
|
|
(defn test-results []
|
|
[runtests/test-output-mini])
|
|
|
|
;; (defn on-update []
|
|
;; (r/force-update-all)
|
|
;; (runtests/run-tests))
|
|
|
|
(defn start! []
|
|
(demo/start! {:test-results test-results})
|
|
(runtests/run-tests))
|
|
|
|
(when r/is-client
|
|
(fw/watch-and-reload
|
|
:websocket-url "ws://localhost:3449/figwheel-ws"
|
|
:jsload-callback #(start!)))
|
|
|
|
(start!)
|