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

Consider deprecating in favor of Redux Toolkit #44

Open
markerikson opened this issue Mar 26, 2021 · 3 comments
Open

Consider deprecating in favor of Redux Toolkit #44

markerikson opened this issue Mar 26, 2021 · 3 comments

Comments

@markerikson
Copy link

First off, I want to offer sincere thanks to the maintainers of this library. It's been a huge help to many people, and we used it in Redux Toolkit up until v1.3.0. In that release, we ported several of our dependencies directly into the RTK codebase to cut down on number of external deps and improve maintainability ( https://github.com/reduxjs/redux-toolkit/releases/tag/v1.3.0 ). One of those was redux-immutable-state-invariant.

Since then, we've made several improvements to our version of the middleware, including warning if the middleware takes too long to run (32ms by default).

In our new https://github.com/reduxjs/redux-toolkit/releases/tag/v1.5.1 release, we've made huge improvements to the runtime thanks to assumptions like working with frozen state from Immer, as well as optimization of the keypath handling by switching from arrays to strings.

RTK includes our immutability middleware in configureStore by default, so most people should be getting it automatically these days. But, since we export the immutability middleware too, people could just add RTK as a dependency and import the middleware if they wanted to for some reason.

So, at this point our version of the middleware is significantly faster and has several other improvements. My suggestion would be to deprecate this package and point people to use RTK instead.

Thanks again for all your work here!

@halaei
Copy link

halaei commented Dec 30, 2021

Hello @markerikson Can we have an independent sub-package just for the immutable middleware inside RTK?
Also it will be very helpful if you merge #35 into RTK for supporting Map and Set.

@markerikson
Copy link
Author

Sorry, no plans to publish the middleware as a separate package or to add Map/Set support - we specifically advise against using those in Redux state.

@halaei
Copy link

halaei commented Dec 30, 2021

Thanks for the quick reply 🙂

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