
Security News
How Enterprise Security Is Adapting to AI-Accelerated Threats
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.
github.com/hilkeheremans/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.
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, seamlessImmutableTransformer } from 'redux-persist-seamless-immutable'
const fooConfig = {
key: 'foo',
storage: LocalStorage,
stateReconciler: seamlessImmutableReconciler,
transforms: [seamlessImmutableTransformer]
}
The transformation is based on comments over at https://github.com/rt2zz/redux-persist/issues/133. Thanks to @josev55 and @robclouth.
FAQs
Unknown package
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
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.