agilgur5 / agilgur5/mst-persist

Add configurable initial merge strategies

Đang mở
#5 3 bình luận 1 reaction 0 người được giao Xem trên GitHub
kind: feature solution: workaround available
Ngôn ngữ chính
TypeScript
Star
86
Fork
14
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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`).

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.