![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
redux-persist-seamless-immutable
Advanced tools
This package lets you use seamless-immutable
on a per-reducer basis along with redux-persist v5
.
Lots of people seem to have trouble with this, so I decided to cobble together a quick fix.
Update to v2: easy-to-fix breaking change;
seamlessImmutableTransformer
has changed toseamlessImmutableTransformCreator
to better reflect its new status as a function.
Why is this package for me?
You love using seamless-immutable
with redux
and redux-persist
and found yourself enthusiastically upgrading to redux-persist v5
.
Having read the redux-persist
docs for v5 you already know that it no longer supports top-level immutable state. But you don't use immutable at that level -- you use it on a per-reducer basis, with top-level state still being a POJO.
You trod on. But, even after using a custom transformer, you then find v5 is consistently throwing you state.merge is not a function
as soon as any immutable reducer changes state.
npm i redux-persist-seamless-immutable
or yarn add redux-persist-seamless-immutable
.
import { seamlessImmutableReconciler, seamlessImmutableTransformCreator } from 'redux-persist-seamless-immutable'
const transformerConfig = {
whitelistPerReducer: {
reducerA: ['keyA', 'keyB']
},
blacklistPerReducer: {
reducerB: ['keyC', 'keyD']
}
}
const fooConfig = {
key: 'foo',
storage: LocalStorage,
stateReconciler: seamlessImmutableReconciler,
transforms: [seamlessImmutableTransformCreator(transformerConfig)]
}
The transformer can accept a config object with the following keys, which will allow you to white or blacklist specific keys per reducer.
{
whitelistPerReducer: {
reducerA: ['keyA', 'keyB']
},
blacklistPerReducer: {
reducerB: ['keyC', 'keyD']
}
}
The transformation is based on comments over at https://github.com/rt2zz/redux-persist/issues/133
. Thanks to @josev55 and @robclouth. Also kind thanks to @aaronisme and @tasos14 for their contributions!
FAQs
Use seamless-immutable with redux-persist v5
We found that redux-persist-seamless-immutable demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.