-
Notifications
You must be signed in to change notification settings - Fork 0
[✨] self-referencing QRLs (was: Allow binding this to the store in useStore) #293
Copy link
Copy link
Closed
Labels
[STAGE-2] incomplete implementationRemove this label when implementation is completeRemove this label when implementation is complete[STAGE-2] not fully covered by tests yetRemove this label when tests are verified to cover the implementationRemove this label when tests are verified to cover the implementation[STAGE-2] unresolved discussions leftRemove this label when all critical discussions are resolved on the issueRemove this label when all critical discussions are resolved on the issue[STAGE-3] docs changes not added yetRemove this label when the necessary documentation for the feature / change is addedRemove this label when the necessary documentation for the feature / change is added[STAGE-3] missing 2 reviews for RFC PRsRemove this label when at least 2 core team members reviewed and approved the RFC implementationRemove this label when at least 2 core team members reviewed and approved the RFC implementation
Metadata
Metadata
Assignees
Labels
[STAGE-2] incomplete implementationRemove this label when implementation is completeRemove this label when implementation is complete[STAGE-2] not fully covered by tests yetRemove this label when tests are verified to cover the implementationRemove this label when tests are verified to cover the implementation[STAGE-2] unresolved discussions leftRemove this label when all critical discussions are resolved on the issueRemove this label when all critical discussions are resolved on the issue[STAGE-3] docs changes not added yetRemove this label when the necessary documentation for the feature / change is addedRemove this label when the necessary documentation for the feature / change is added[STAGE-3] missing 2 reviews for RFC PRsRemove this label when at least 2 core team members reviewed and approved the RFC implementationRemove this label when at least 2 core team members reviewed and approved the RFC implementation
Type
Projects
Status
Released as Stable (STAGE 5)
Is your feature request related to a problem?
It would be nice to have have functions in stores be bound to the store object.
Describe the solution you'd like
I think a
bindoption to useStore would be nice. It could even betrueby default because the majority use case for functions in the store is using the store object itself.This can be used orthogonally with
deepandreactive.Describe alternatives you've considered
letting the deserializer do it, but then the function is only bound when it's deserialized.
Additional context
This allows making zustand-like APIs.
UPDATE
See this comment to see how to do it manually, but it would be nice if the optimizer did it.