Skip to content

Commit

Permalink
docs: update link to svelte-hmr (#12893)
Browse files Browse the repository at this point in the history
  • Loading branch information
kidonng authored Apr 18, 2023
1 parent 3aa2127 commit 2ddeead
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/create-vite/template-svelte/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ It is likely that most cases of changing variable types in runtime are likely to

**Why is HMR not preserving my local component state?**

HMR state preservation comes with a number of gotchas! It has been disabled by default in both `svelte-hmr` and `@sveltejs/vite-plugin-svelte` due to its often surprising behavior. You can read the details [here](https://github.com/rixo/svelte-hmr#svelte-hmr).
HMR state preservation comes with a number of gotchas! It has been disabled by default in both `svelte-hmr` and `@sveltejs/vite-plugin-svelte` due to its often surprising behavior. You can read the details [here](https://github.com/sveltejs/svelte-hmr/tree/master/packages/svelte-hmr#preservation-of-local-state).

If you have state that's important to retain within a component, consider creating an external store which would not be replaced by HMR.

Expand Down

0 comments on commit 2ddeead

Please sign in to comment.