@atomico/router
powerful router for Webcomponents, React and Preact
Last updated
powerful router for Webcomponents, React and Preact
Last updated
@atomico/router aims to facilitate the creation of SPA-type applications through the following strategies:
slot: you can reference a slot within the Router Switch to show on a specific path.
elements: you will be able to mount CustomElements through Instantable elements.
asynchronous generators: through asynchronous generators you will be able to show multiple views according to the load state, for example transitions.
case
slot to associate at the time of the match with path
String - read only
match
Match
onMatch
It is dispatched every time the router matches a new route.
Component that declares the behavior of the route, with it you can:
Define a slot to show instantly when matching the browser path.
Define a load callback to execute when matching the browser route.
load
asynchronous content loader
Function
for
slot to associate at the time of the match with path
String
path
expression for path
String
memo
memorize the state resolved by load according to the concurrent path
Boolean
destroy
Remove associated view on route change
Boolean