Crate sycamore_router

Source
Expand description

The Sycamore Router.

Structs§

HistoryIntegration
A router integration that uses the HTML5 History API to keep the UI in sync with the URL.
RoutePath
A list of Segments.
RouterBaseProps
Props for RouterBase.
RouterProps
Props for Router.
StaticRouterProps
Props for StaticRouter.

Enums§

Capture
Represents a capture of an URL segment or segments.
Segment
Represents an URL segment or segments.

Traits§

Integration
A router integration provides the methods for adapting a router to a certain environment (e.g. history API).
Route
Trait that is implemented for enums that can match routes.
TryFromParam
Fallible conversion between a param capture into a value.
TryFromSegments
Fallible conversion between a list of param captures into a value.

Functions§

Router
The sycamore router component. This component expects to be used inside a browser environment. For server environments, see StaticRouter.
RouterBase
A lower-level router component that takes an instance of your Route type. This is designed for struct Routes, which can be used to store additional information along with routes.
StaticRouter
A router that only renders once with the given route.
navigate
Navigates to the specified url. The url should have the same origin as the app.
navigate_replace
Navigates to the specified url without adding a new history entry. Instead, this replaces the current location with the new url. The url should have the same origin as the app.

Derive Macros§

Route
The Route procedural macro.