@matthewp/reactive-vt-router
v0.0.3
Published
Usage:
Downloads
5
Readme
@matthewp/reactive-vt-router
Usage:
The basis is the fromNavigation
observable which listens for navigate
events. Pipe this into the handle
function which does the rest.
import { fromNavigate, handle } from '@matthewp/reactive-vt-router';
fromNavigate()
.pipe(
handle()
)
.subscribe();
For full control don't use handle
, but instead use each part. You can swap out the parts you don't need (for example remove fetch
and swap
and put your own DOM update where swap
was).
import {
fromNavigate, intercept, fetch, startViewTransition, swap
} from '@matthewp/reactive-vt-router';
fromNavigate()
.pipe(
intercept(),
fetch(),
startViewTransition(),
swap(),
)
.subscribe();