RouterActions
The actions creators for router module.
Actions
$init
typeless lifecycle method$unmounted
typeless lifecycle methoddispose
dispatch this action to stop listening for history API changes. Can be useful in unit testing.locationChange: (location: RouterLocation)
dispatched by router module after location changed.push: (location: LocationChange)
dispatch this action to change the location, and add a new entry to the stack.replace: (location: LocationChange)
similar topush
, but it doesn't add a new entry to the stack.
Types
type LocationChange =
| string
| {
pathname: string;
search?: string;
};
interface RouterLocation {
pathname: string;
search: string;
type: 'push' | 'replace';
}