helix

https://github.com/Lokeh/helix
2020-11-13T16:55:17.155200Z

Have any helix users managed to implement a reliable hook for subscribing to re-frame subs? I've got one that seems to work well enough, but occasionally results in "Cannot update a component from inside the function body of a different component." warnings.

lilactown 2020-11-13T18:18:09.155700Z

we use useSubscription and r/track, it works okay

đź‘Ť 1
lilactown 2020-11-13T18:18:29.156200Z

we get a bunch of extra renders, but I've never seen "Cannot update a component from inside the function body of a different component."

jimmy 2020-11-13T19:54:53.158500Z

So the readme says that fast-refresh should be installed https://github.com/lilactown/helix/blob/55cb707728418176ccc4aa364ae0f6faffc0c448/README.md#installation But the section on fast refresh says I need to install it. https://github.com/lilactown/helix/blob/55cb707728418176ccc4aa364ae0f6faffc0c448/docs/experiments.md#fast-refresh It seems like the readme is the most up to date one, but it seems the document on fast-refresh is correct. At least for my setup, if I try to require the refresh experimental namespace I get "No such namespace: react-refresh/runtime" Just wanted to see what the intended behavior was. Should refresh be included or not?

lilactown 2020-11-13T20:54:32.159800Z

If your build tool follows deps.cljs (shadow-cljs does) it will automatically install it

lilactown 2020-11-13T20:54:47.160300Z

However I have noticed that sometimes it doesn’t and I don’t know why lol

lilactown 2020-11-13T20:55:22.161200Z

You’ll want to make sure that you have the correct version of react-refresh for the version of React you use.

lilactown 2020-11-13T20:56:27.162400Z

If you are seeing errors around missing react-refresh/runtime then you’ll want to manually install it

đź‘Ť 1