Create a native history controller backed by in-memory history.
Lifecycle behavior:
start()
stop()
getInitialURL()
Incoming URL behavior:
"replace"
"push"
Example:
const history = createNativeHistory({ adapter: linkingAdapter, onIncomingURL: "replace",});await history.start(); Copy
const history = createNativeHistory({ adapter: linkingAdapter, onIncomingURL: "replace",});await history.start();
Create a native history controller backed by in-memory history.
Lifecycle behavior:
start()is idempotent.stop()is idempotent.start()appliesgetInitialURL()once per start cycle only if navigation state has not changed since startup began.getInitialURL()resolution from overriding user navigation that happened during startup.Incoming URL behavior:
"replace"updates current entry (default)."push"appends a new entry.Example: