[−][src]Module seed::routing
This module is decoupled / independent.
Structs
Url | Contains all information used in pushing and handling routes. Based on React-Reason's router. |
Functions
current_url | For setting up landing page routing. Unlike normal routing, we can't rely on the popstate state, so must go off path, hash, and search directly. |
push_route | Add a new route using history's |
setup_hashchange_listener | Add a listener that handles routing when the url hash is changed. |
setup_link_listener | Set up a listener that intercepts clicks on elements containing an Href attribute, so we can prevent page refresh for internal links, and route internally. Run this on load. |
setup_popstate_listener | Add a listener that handles routing for navigation events like forward and back. |