Fork me on GitHub
#helix
<
2021-11-10
>
euccastro11:11:21

beginner question: how does one do hot reloading a la figwheel if all the app state is in helix.hooks/use-state bindings? I've tried instantiating the root component in a defonce but it doesn't seem to get refreshed on code updates (I imagine because the component embeds the old code?)

(defnc app [] ,,,)

(defonce app' ($ app))

(defn ^:after-load render []
  (println "rendering!")
  (rdom/render app' (js/document.getElementById "app")))

(defonce start
  (do
    (enable-console-print!)
    (render)))

euccastro11:11:05

i.e., if I make a change to the definition of app above I get the "rendering!" printout in the console, but the page doesn't reflect my changes

lilactown17:11:30

that is what fast-refresh is for