Closed Prinzhorn closed 2 years ago
Thanks! Sorry for long reaction. Since v.0.6.8 you can pass any reactive variables as active
action parameters to update liks's state when they change.
Example:
<a href={foo ? '/#/' : '/#/not-home'} use:active={foo} exact>{foo ? 'Home' : 'Not Home'}</a>
Since all the attributes are cached once the action is initialized (breaking assumptions about Svelte's reactivity and consistency), it does not react to any changes:
https://svelte.dev/repl/a41434e5206846a99eb7562bd6e17968?version=3.42.1
Sure these are edge cases, but if you create something like a CMS or app builder then dynamic menus/links will happen if you push live updates to the client (e.g. when using Meteor).