Replies: 1 comment
-
|
Hey @thany glad to have you here, I'd like to point you out to https://zustand.docs.pmnd.rs/middlewares/immer. btw, currently there's no way to have side-by-side comparison with the current theme we are working on revamping docs but first on docs and then on website. We're planning to use Starlight but that would take some time. About the benefits of using Immer is simple than no boilerplate to update nested complex objects only mutable updates with the guarantee of an immutable state that's it |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Looking at how prominently Immer is mentioned in the documentation, I would expect there is significant merit to using it. But a clear explanation of the advantages of doing so, are totally absent.
👉🏻 https://zustand.docs.pmnd.rs/integrations/immer-middleware
It looks like immutable state is its own arbitrary advantage. Like if you know you want that, then there's your one and true advantage of Immer. And that feels totally abstract to me. And I'm sure it's not like that. I'm probably just missing the context. In short: please add to the documentation why using Immer is a good idea, not just what it technically enables you to do.
On top of that, it almost immediately carries on listing an example implementation. This is good, but it doesn't show how it is different, and therefor perhaps better than without Immer. A simple side-by-side should fix that.
Beta Was this translation helpful? Give feedback.
All reactions