How to export state to JSON #1096
Answered
by
bcakmakoglu
sultaniman
asked this question in
Q&A
-
Hey, Thanks for your work! I am wondering on how can I export and import state from json? |
Beta Was this translation helpful? Give feedback.
Answered by
bcakmakoglu
Sep 13, 2023
Replies: 1 comment
-
There are two methods you can use for this purpose
Both of these methods are available from |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
bcakmakoglu
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There are two methods you can use for this purpose
toObject
- returns an object with the necessary info to save and restore a graph (i.e. nodes, edges and viewport position + zoom)fromObject
- takes an object that is returned bytoObject
and restores the graph to the state was was givenBoth of these methods are available from
useVueFlow