I am looking zustand for first time and I must that it is almost similar to Reduc toolkit and I guess the state and reducers are directly defined inside store instead of slices! I have a query that is zustand also uses immerse library under the hood for state cloning?
So basically adding all the methods you'd need in your program in the store is just like extracting your functions in separate files? That's really cool if I'm understanding that right.
I used the same counter logic as mentioned in the Zustand documentation to make a application with two routes. /one - where it shows the no.of bears in the area. /two - with the button click. But for the button click on /two it doesn't increment the count on button one. Can anyone help me with this.
Noted: __________________________________ set( (state) => ({ //code }) ) these ( ) brackets after arrow is compulsory I re-wrote my components thrice just for these tiny brackets