ctrlplusb / easy-peasy

Vegetarian friendly state for React
https://easy-peasy.dev
MIT License
5.03k stars 190 forks source link

feat: Pass full state to persist transforms #816

Closed damassi closed 1 year ago

damassi commented 1 year ago

Noticed a slight divergence from the redux-persist transform api, where there they pass the full state along with the in and out calls. This also aligns with the api as seen in create-transform code in the easy-peasy codebase.

Now the api is:

in: (state, key, fullState) => { ... }
out: (state, key, fullState) => { ... }
vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
easy-peasy ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 12, 2023 5:54pm
damassi commented 1 year ago

@no-stack-dub-sack Updated tests to reflect the additional parameter being passed into the transform. Let me know if this is sufficient!

no-stack-dub-sack commented 1 year ago

Thanks @damassi! LGTM!