MrBlenny / react-flow-chart

🌊 A flexible, stateless, declarative flow chart library for react.
https://mrblenny.github.io/react-flow-chart/index.html
MIT License
1.46k stars 307 forks source link

[QUESTION] generate json from flow ? #64

Closed BennisKhalil closed 4 years ago

BennisKhalil commented 4 years ago

Is there a way to generate the Json of the created flow??

zHaytam commented 4 years ago

You'll need to use your own "state wrapper", just like the ExternalReactState story.

You'll then be able to access your state (e.g. this.state) and turn it into a json.
Example: https://codesandbox.io/s/react-flow-chart-poc-4t8j2

Not sure if this is the best way to do this though.

BennisKhalil commented 4 years ago

ty man :')