-
Notifications
You must be signed in to change notification settings - Fork 8
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
Pattern for no store actions? #34
Comments
Can @Ebubekir-Tas take a look? |
This means that as of now Also for adding to an empty array, can you provide an example of this issue? This seems to work for me:
I notice in your example you have:
But in this example |
I am having trouble recreating the array issue on StackBlitz but using Right now I'm using Here's an example where it seems to just never run: |
I have a large store with a lot of actions. I'm trying to follow the no store actions pattern from the Zustand repo but I am having some issues with immer.
I have two example functions. One is the regular way where I get the error:
TypeError: Cannot assign to read only property 'value' of object '#<Object>'
I also get an error when trying to add values to an array that is empty.
When I try to use the function version with Immer's produce function nothing happens.
Here is an example:
https://stackblitz.com/edit/stackblitz-starters-uutgra?file=app%2Fpage.tsx
The text was updated successfully, but these errors were encountered: