You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Drop promise based producer support. Immer supports returning a promise from a producer. I don't think I ever saw usage of that in the wild, and it is a bit of an oxymoron as it makes it easy to leak drafts. Since producers should be like enter-write-exit without happening anything in the mean time, and it complicates the code base unnecessarily, I'm proposing to simply drop it.
Drop support for ES5 mode. Proxies are now in all major browsers, and legacy support can stay on Immer 9, I think it is now the time to create a smaller (and simpler) Immer package by removing the ES5 fallback.
Don't use array.length assignment in JSON patches. See [breaking change] Do not replace array.length as patch when removing items #964, array.length assignments should not be used to shorten arrays in JSON patches. Since this can both increase payload sizes and affect logic based on patches, saved this for a major bump.
🚀 Feature Proposal
Hi folks,
I've collected a bunch of issues that are together I think worthy of being put in a separate major version:
getterproperty in irrelevant plain objects #1012 Immer takes a long time to update the data. #867 [breaking change] implement and default to useStrictShallowCopy, omitting getters #941import produce from 'immer'andimport {produce} from 'immer'. Since both default exports and offering two ways to achieve exactly the same are anti patterns, and removing simplifies ESM support, I'm proposing to drop the default export. This is quite a breaking change, but on the upside easily handled by a simple search and replace. Possible breaking change in package exports in v9.0.13 #937 (comment) / Migrate the RTK package to be full ESM reduxjs/redux-toolkit#3095[ ] Support map/set by default -> avoid control issues like import and callenableMapSet()error happens even after enableMapSet() is called. #1022Notes to self:
cc @markerikson