Tags: ItalyPaleAle/svelte-spa-router
Tags
This version contains bug fixes, including a fix for a regression int… …roduced in version 3.0. **Fixes:** - Do not un-mount components before replacing them, as with dynamically-imported components the replacement might happen in a next tick, causing the component to be un-mounted and re-mounted in the DOM (fixes #136) - Better cloning of the detail object to ensure it's not altered between ticks.
svelte-spa-router has reached version 3.0! 🎉🥳 This major release contains a set of new features, most notably support for dynamically-imported components (which enables code-splitting)! **Breaking changes:** - Because parameters from the URL are now URL-decoded, if you were doing it on your application before, you might need to update the code to avoid URL-decoding twice - The `wrap` method exported by `svelte-spa-router` is now considered deprecated and using it will throw a warning; it will be removed in a future version. Please upgrade to the new `wrap` method exported by `svelte-spa-router/wrap`, which also supports dynamically-imported routes. See the [documentation for route pre-conditions](https://github.com/ItalyPaleAle/svelte-spa-router/blob/master/Advanced%20Usage.md#route-wrapping). - The method `nextTickPromise`, which was already deprecated, has been removed **New features:** - Add support for dynamically-imported components (fixes #73) - Restore scroll position on navigation (thanks @liquiddandruff) - Route pre-conditions can be async functions (fixes #125) - Can now pass static props to a component using the wrap method (fixes #131) (thanks @matt-psaltis) - Route Loaded event includes the path of the route (fixes #132) **Changes:** - Decode URL-encoded parameters from URL (fixes #107) - Prefix for nested routers can be a regular expression that will be removed if matched (fixes #134) - Using the `tick` method from Svelte rather than re-implementing it. The method `nextTickPromise`, which was already deprecated, has been removed. - svelte-spa-router now uses ES2016 features (async/await) internally and requires a recent-enough browser (most browsers from 2017 onwards should be good), or transpilation with Babel - Added devcontainer, so you can develop inside a Docker container or GitHub Codespaces **Fixes:** - Tests now run against Chrome running in Docker, so there's no more issues with the CI server updating Chrome
PreviousNext