polemius / recoil-persist

Package for recoil state manager to persist and rehydrate store
https://polemius.dev/recoil-persist/
MIT License
350 stars 39 forks source link

fix: prevent atom effect from overwriting state when batching set's #37

Open bartvanremortele opened 3 years ago

bartvanremortele commented 3 years ago

Fixes #35

polemius commented 3 years ago

Thank you for PR. I have run test against this PR and these two are failing:

Storage: async
    ✕ should remove key from storage if reset (83 ms)
    ✕ should update storage if using atomFamily (16 ms)

Could you please check it?

insaindesign commented 2 years ago

It's a little ugly, but i had a go at fixing this for async storage: https://github.com/insaindesign/recoil-persist/commit/08113191b1ec5517269fbaa11da485eca4fe2d0c.

Note it depends on the changes I had made in https://github.com/polemius/recoil-persist/pull/55/files (all storage to async).