Closed tomekw closed 4 years ago
Hi @Lokeh! Thank you for Helix!
I'm struggling to use fast-refresh with figwheel-main. I managed to add a ns to :preloads which injects a hook and set up a callback when code changes. Basically something like this:
:preloads
(ns ^:figwheel-hooks fast-refresh (:require [helix.experimental.refresh :as r])) (r/inject-hook!) (defn ^:after-load refresh [] (r/refresh!))
I know the refresh callback is invoked as it shows the component in the "updated" list but nothing changes on screen. The code is not re-rendered.
refresh
I used react 16.13.1, helix 0.0.11, and react-refresh 0.8.2.
Is there anything else needed? Am I missing something?
And of course I will drop a PR with documentation changes when I make it work :) 👋
OK, so the problem was I didn't have React Dev Tools installed 🤦🏻♂️🕵🏻♂️ I will mention this when updating the docs :)
Oof that is rough! Thank you for the PR
Hi @Lokeh! Thank you for Helix!
I'm struggling to use fast-refresh with figwheel-main. I managed to add a ns to
:preloads
which injects a hook and set up a callback when code changes. Basically something like this:I know the
refresh
callback is invoked as it shows the component in the "updated" list but nothing changes on screen. The code is not re-rendered.I used react 16.13.1, helix 0.0.11, and react-refresh 0.8.2.
Is there anything else needed? Am I missing something?
And of course I will drop a PR with documentation changes when I make it work :) 👋