svelte-routing
svelte-routing copied to clipboard
Pass existing props to Link.getProps
Hi, please take a look and let me knows if this makes sense to land :)
This adds a fifth field existingProps
to getProps
, which passes down the existing props defined on the Link element. This seems to make Link-based components a bit more reuseable since now we can keep existing props that are passed down (eg. <NavLink class="nav-item">
could simply append active
to the existing classes). I updated the example to clarify.
Thanks!