Figwheel displays the code bellow just fine. But I have to refresh the page to see any changes. What has to change for Figwheel to show changes? Is there a command to force redraw, without losing the application state?
BTW: Chrome has Disable Cache true and the CLJS icon appears when the file is saved.
(defn simple-example []
[ui/mui-theme-provider {:mui-theme (get-mui-theme
{:palette {:text-color (color :blue800)}})}
[:div
[ui/app-bar {:title "Hi all"
:icon-class-name-right "muidocs-icon-navigation-expand-more"}]
[ui/paper
[:div
[ui/tabs
[ui/tab {:label "Menu" :value "0"}
[:div "Hello world"]]]]]]]))
(defn ^:export run []
(render [simple-example]
(js/document.getElementById "app"))))
From the docs:
An example reload hook plus configuration for Reagent:
And then in your
project.clj
:/edit
Note that re-frame uses Reagent. In the case of re-frame I recommend starting with the
re-frame-template
. E.g.,This will give a default
core.cljs
as follows:The
index.html
has a node with idapp
and callsinit
. And theproject.cljs
specifies theon-jsload
as follows:This should absolutely update the page with the component changed. If it does not do what you want I might have misunderstood your question.