-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use-memo and use-callback via metadata #48
Comments
Is there something missing in the latest version of Helix? I know that |
Right now, I haven't fully tested it yet in production, which is why it's still behind a feature flag. In general I'm still a little unsure about using metadata to manage these type of semantics. I also want to ensure that it will emit compile warnings when breaking the rules of hooks. |
We should be able to signal that an expression should be wrapped in a
use-memo
oruse-callback
by annotating it with metadata in the body of adefnc
or adefhook
.^:memo
and^:callback
metadata should telldefnc
anddefhook
to emit ause-memo
oruse-callback
hook that will automatically fill dependencies using the same algorithm as:auto-deps
.A dependency seq can also be provided to override this behavior:
^:memo
and^:callback
metadata should be usable inlet
bindings:^:memo
and^:callback
should allow enforcement of the Rules of Hooks checks that are currently behind an experimental feature flag.The text was updated successfully, but these errors were encountered: