helix

https://github.com/Lokeh/helix
danieroux 2020-03-03T09:16:44.114500Z

Doing a port of our small-ish hx app to helix: What would the corresponding hx.hooks.alpha/useStateOnce be? Or do I need to reimplement it?

danieroux 2020-03-03T11:45:13.115200Z

And similarly for useValue?

lilactown 2020-03-03T16:45:23.116300Z

both of them you can copy + paste into your project if you’d like. I did not include them in helix

lilactown 2020-03-03T16:46:24.117300Z

useStateOnce was something I thought would be useful for hot reloading, but it also changed the behavior of your app. the better option, if you want persistence across reloads, is to use React Fast Refresh

lilactown 2020-03-03T16:49:04.118900Z

if you do want that state to persist across mounts, you should probably use React Context for it instead