Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seeding starting data #30

Open
dpalay opened this issue Mar 11, 2021 · 1 comment
Open

Seeding starting data #30

dpalay opened this issue Mar 11, 2021 · 1 comment

Comments

@dpalay
Copy link

dpalay commented Mar 11, 2021

I'd like my app to start with some more complex defaults than what recoil could give by itself. I was hoping that there'd be a way to seed the state into local storage and then have recoil pick that up, but I'm having difficulty with it.
I'm using an atomFamily + atom<id[]> pair, and want to start the app with 2 of the objects. Is there a good way to do this with recoil-persist?

@polemius
Copy link
Owner

The default in atom configuration doesn't work? Could you please add some code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants