Replies: 1 comment 2 replies
-
Probably, I haven't seen something similar. I wonder if anyone has. Feel free to comment. (If there's a demand, it might be good for a third-party library.) |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to have
useActionListener
hook implementation. I wonder if there is existing approach for such use case. My motivation behind this approach is to not rise some complex component state to global, and have more imperative approach to simplify code.Usage will be maybe something like:
create the action like:
And here is my shot for
createAction
:Here is Stackblitz sandbox: https://stackblitz.com/edit/zustand-yx62ki?file=src%2FApp.js,src%2Fstore.js,src%2Fcomponents%2FPeople.js,src%2FstoreAction.js
Beta Was this translation helpful? Give feedback.
All reactions