You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
313 B

package outwatch.router
package dsl
import outwatch._
import outwatch.dsl._
object C {
def link[P](linkHref: String)(attrs: VDomModifier*)(implicit store: RouterStore[P]): BasicVNode =
a(href := linkHref)(
onClick.preventDefault.useLazy(Replace(Path(linkHref))) --> store.sink,
attrs,
)
}