URL Router
A router adapter for blocks that keep state in the URL: read the location, navigate, build an href and follow changes. hashRouter keeps a hash route's path (#/devices?device=a1), historyRouter the path and query string, memoryRouter is for tests; wrap your own router's API in the same shape.
Example
Location /devices?sort=name, 0 navigations
url-router-demo.tsxCopy code
Installation
Copy code
Usage
ImportCopy code
API reference
This item exports functions and types rather than components.
Other exports
hashRouterhistoryRoutermemoryRouterwithParamtype MemoryRoutertype RouterWindowtype UrlLocationtype UrlNavigateOptionstype UrlRouterAgent actions
Runs agent.snapshot() from @ui-sdk/react/agent on the live preview above.