Native Konva has special mechanizm to save/load a full canvas stage with node.toJSON()
and node.create(json)
functions (see demo).
This approach is not recommended when using svelte-konva. In svelte-konva you should instead save the state of your app which also resembles the full stage data required. So there is no need to save any Konva internals and nodes.
The demo saves and retrieves the data from localstorage as JSON but you’re free to use any way of saving you’d like.
Enjoying Konva? Please consider to
support the project.