polemius/recoil-persist

persistence_UNSTABLE not mentioned in Recoil documentation

rhys-saldanha opened this issue · 5 comments

I think this is a symptom of the property being unstable, but in the current latest version of Recoil, adding it to my atom definition is throwing a TypeScript error.

I've checked the Recoil documentation and persistence_UNSTABLE isn't mentioned anywhere. For reference, annotating the property with ts-ignore fixes the issue and local persistence works as expected.

Is this a missing type within Recoil, or is this property only needed and used by recoil-persist?

Here the PR with this documentation.

This options will changed to effects_UNSTABLE and I have to update recoil-persist library.

I've seen the same (different PR, same information), if I figure out what I'm doing am I ok to submit a PR referencing this issue?

@rhys-saldanha yes, of course 👍

I have a working implementation for atom (the simple case) using effects_UNSTABLE, but it fails for use with atomFamily - once #3 is solved, I think I'll have enough info to fix my implementation

@rhys-saldanha Thank you very much for your contribution. I have updated examples in README and also added the migration guide to 2.0.0. Looks like we could close this issue.