API/useBrowserAdapter()
useBrowserAdapter()
hooksrc/hooks/use-browser-adapter.ts0 parameters
A RouterAdapter for apps without a router: history.pushState / replaceState, plus the
back and forward buttons.
Every instance on the page stays in sync, because navigations fan out to all of them. On the server the location is empty.
Import
Section titled “Import”import { useBrowserAdapter } from '@qubeejs/react';Signature
Section titled “Signature”function useBrowserAdapter(): RouterAdapterReturns
Section titled “Returns”The current pathname and query, and a navigate that moves the browser
Example
Section titled “Example”function Articles(): ReactElement { const list = useQubeeList(articleList, useBrowserAdapter());
return <a href={list.href({ page: 2 })}>2</a>;}