This release contains a new feature and other small improvements.
New features:
- You can now pass a parameter to the
use:link
action (e.g.use:link={val}
) which will take precedence over the tag'shref
value. You can use this to create links whose target changes reactively, for example. (Thanks to @cianx!) - Using the
tick
method from the Svelte runtime in place of running our ownnextTickPromise
. From now, the method remains an alias of Svelte's owntick
, but will be deprecated in version 3 of the router. (Using the method directly will show a deprecation warning in the console)
Fixes:
- Fixed: passing more than one class to
use:active
using theclassName
property (use:active={{className: 'something something-else'}}
) was causing a runtime exception. - Setting the initial value for the
loc
readable store when the first object subscribes to it, rather than during initialization. This fixes issues when applications subscribe to theloc
store later in their lifecycle (e.g. if the router is added after page navigations have happened already).
Misc:
- Updated devDependencies