async function handleReload() {
// Update existing state via reload()
await navigation.reload({
state: { ...navigation.currentEntry.getState(), newState: 3 },
});
// Print current state to the console
const current = navigation.currentEntry;
console.log(current.getState());
}NavigationHistoryEntry: getState() method / notebook
NavigationHistoryEntry: getState() method
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.