type ActivityRouter.RouteArg
A route argument: either an Activity instance (by reference) or a factory function.
type RouteArg<P extends string = string> =
| Activity
| ((params: RouteParams<P>) => Activity | undefined | void);
Notes
- Factory functions receive the extracted route parameters as their argument, typed according to the route pattern, and may return
undefinedto skip activation.
Related
class ActivityRouter
A class that manages activation and deactivation of activities, with support for path-based routing.route()
Registers a route pattern with one or more activities or factory functions.
