-
Couldn't load subscription status.
- Fork 3
Modify handler store, for better hooks notifications #152
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
Conversation
| * Useful when a component stores a Handler instance directly in local state | ||
| * (outside of the Zustand store selector lifecycle). | ||
| */ | ||
| export function useObservedHandler( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is maybe silly, bad hook, but I was passing around handler references from a callback., and then not getting notifications from it in a state var (obviously, but also tempting to do).
Alternately, maybe we should not pass around the full handler, and just an ID like before to enforce that you get the handler details from the store?
|
It looks like you're trying to make handler observable, which should already be covered by I will take care of this feature after events persistent merged. Just give me little more time. |
Ok, there's going to have to be a big overhaul to handlers then. Handlers are currently just being mutable from what I can see. From what I understand of Zustand, its some get/set sugar on top of standard flux immutable structure. If going towards zustand integration, I think perhaps the functions you call directly on handlers may want to be rethought. I think perhaps we want to move to functional/service APIs existing directly on the store interface, and you qualify with a handler id. |
IMO this seems much higher priority than persistent events. Right now this is not usable. Workflow handlers never complete, and their attributes never change. You can basically start a workflow and that's it |
ok, let me prioritize this then. |
|
According to the requirement from this PR. Having a more comprehensive PR: #154 |
Fixes/tweaks to address the following issues: