agilgur5 / agilgur5/mst-persist
Add configurable initial merge strategies
未关闭
kind: feature
solution: workaround available
- 主要语言
- TypeScript
- 星标
- 86
- 派生
- 14
- PR 合并指标
- 30 天内没有已合并 PR
描述
Per my comments in https://github.com/agilgur5/mst-persist/issues/1#issuecomment-508253724, should support something like [`redux-persist`'s State Reconcilers](https://github.com/rt2zz/redux-persist#state-reconciler) as merge strategies. This is basically just to handle state created in `.create(...)`, unless `persist` is called after some actions have been performed (which wouldn't be the standard usage, but is possible 🤷♂).
`applySnapshot` is equivalent to `hardSet` but with the model's defaults added. Users should be able to configure if they want a different merge strategy like a shallow merge (`autoMergeLevel1`).
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。