Open
Description
Describe the issue
When updating the code of parent component, the local state of children component is lost(with preserveLocalState: true
). While the local state of parent component can be kept.
In below screenshot, the local state of Counter
will reset to default when App
is change. Because in svelte-hmr
, when parent component is changed, it will recreate itself(can keep local state) and it's children components(without keeping local state).
Expected behavior
The local state of children is kept as well when updating parent component, just like react does. It's annoying when debugging between parent component and children components if the local state is lost.
And developer may think it's a bug of HMR because of the inconsistence.
Metadata
Metadata
Assignees
Labels
No labels