Skip to content
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

Difference between mutative and immer #16

Open
udas0674 opened this issue Oct 26, 2023 · 3 comments
Open

Difference between mutative and immer #16

udas0674 opened this issue Oct 26, 2023 · 3 comments

Comments

@udas0674
Copy link

Hello: My team is considering moving to mutative from immer. We would like to know below:

  1. Main difference in implementation of state production in mutative than immer, which causes mutative to be faster. For example, how does mutative handle deeply nested states, et al?
  2. Test coverage for mutative.
  3. Production ready date or when V1 would be released.

Thank you, again! The results so far.

@unadlib
Copy link
Owner

unadlib commented Oct 28, 2023

hi @udas0674 ,

  1. Mutative and Immer both implement mutable drafts based on Proxy, but Mutative utilizes a stack structure to collect draft instances, thereby gaining a significant advantage in performance. On the other hand, Immer utilizes a process of freezing states to mark them, and traverses these states during the finalization drafts process. And the differences aren't solely in performance, Mutative offers more features than Immer. For more details, you can refer to the README.
  2. The test coverage for Mutative is 100%, and it passed all the Immer test cases.
  3. Mutative v1 might be released next week, and I'm working hard to make that happen.

Thanks for your interest in Mutative!

@udas0674
Copy link
Author

Thank you!

@unadlib
Copy link
Owner

unadlib commented Dec 15, 2023

hi @udas0674 , we've released mutative 1.0. Feel free to use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants