-
Notifications
You must be signed in to change notification settings - Fork 18
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
Proposal: add produce, which is an ALIAS of create. #32
Comments
import statement of immer in v9 import produce from "immer"; import statement of immer in v10 import { produce } from "immer"; If produce can be used instead of create, it will work for most patterns for v10 immer that do not use immer's special features. |
I read the documentation and learned that there is a wrapper called mutative-compat. Sorry for creating the issue without reading the documentation. However, I also feel that my project does not want to add the wrapper as a dependency. Install mutative and change the import statement. |
How do you feel about adding such an API for quickly migrating from Immer to Mutative? - import { produce } from "immer";
+ import { produce } from "mutative/migrate-immer"; It is important to note that Immer and Mutative have significant differences in their configurations, and therefore they cannot be considered completely equivalent. |
I think it is an excellent proposal. I think a lot of people, myself included, are using just "produce". I think it would be great if just changing the library would increase the processing speed. |
hi @exuanbo , it might be possible to implement a migration API similar to |
@exuanbo I'll probably be working on the proposal using |
The basic syntax is the same, so when changing from immer to mutative, it is only necessary to replace the import statement.
I haven't looked at the source code, but I think it would be as simple as adding the following one sentence.
The text was updated successfully, but these errors were encountered: