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

Saving/loading of paths #225

Open
jackcrane opened this issue Apr 19, 2023 · 1 comment
Open

Saving/loading of paths #225

jackcrane opened this issue Apr 19, 2023 · 1 comment

Comments

@jackcrane
Copy link

I read the guide on the website and other issues and could not find anyone else having this issue and/or references to it. I am able to save and load nodes from localstorage fine, but saving/loading does not preserve connections, and since connections are pretty crucial I was wondering if there was anything I was missing.

My repo: https://github.com/jackcrane/data

@chrisjpatty
Copy link
Owner

chrisjpatty commented Apr 27, 2023

Thanks for the repo, it looks like the problem is that you're hydrating your nodes from local storage into your default nodes state instead of the actual nodes state. There's a limitation right now that you can only set the nodes dynamically on the first render (this will change soon), but you can get around it by setting a new key prop on the editor to destroy and recreate it with new nodes.

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