I know this seems like a big jump, but I am interested in driving towards doing a 1.0 release of helix sooner rather than later
to me, helix 1.0 would include turning on some of the more experimental parts of helix: • support for react-refresh • inference and auto-filling deps for custom hooks • linting hooks usage at least
these are currently behind feature flags or are otherwise opt in, if they exist at all (inference for custom hooks hasn't been implemented yet)
I've created a helix.edge.core
namespace that now represents a more volatile namespace for these features to be tried out
helix.core
will stay stable with no breaking changes up until 1.0. helix.edge.core
will experience potentially breaking changes
on release of 1.0, helix.edge.core
will be renamed to helix.core
my goal is to encourage people to use helix.edge.core
to validate those experimental features
how reliable would inference be for hooks deps? for something like effect and layout-effect
it already works, you can pass in :auto-deps
instead of a vector of dependencies for use-effect
and use-layout-effect
it's reliable
I personally don't like using it for use-effect
, but I think it is very good for use-memo
and use-callback
the idea is that we could allow it to be used with custom hooks. so if you define a custom hook like:
(defhook use-custom-thing
;; annotate with metadata an argument that should be a deps array
[^:deps deps x]
;; do something with deps and x
(hooks/use-effect
deps
(prn x)))
Then the defnc
macro can detect the metadata set on the use-custom-thing
hook and check to make sure that you have passed in deps to the argument, or auto-fill it for youI haven't done this work yet tho
I never use use-memo or use-callback, perhaps because I never had to optimize the render so much. Maybe I should?
It's awesome that auto-detecting stuff works runtime, it's like not even javascript