Native History First
Push, replace, and pop navigation stay close to the browser's own history stack.
A browser-native navigation engine for lifecycle routing, route guards, middleware, dynamic params, and predictable back-button behavior without owning your rendering layer.
History++ keeps browser-native navigation behavior intact while adding predictable route lifecycle orchestration.
The URL stays the source of truth. Routes describe UI state. Your application keeps control of rendering.
Push, replace, and pop navigation stay close to the browser's own history stack.
Routes can react through onArrive, onMeet, onReturn, onExit, and onComeback hooks.
Render pages, modals, sheets, fragments, or app state with your own UI code.
Register routes, attach lifecycle handlers, then sync the current browser URL into the router on first load.
Route registration and initial URL sync
history.router("/", {
onMeet() {
console.log("Home");
}
});
history.router("/about", {
onMeet() {
console.log("About");
}
});
history.navigateReplace(location.pathname + location.search);
History++ is designed around native URL state and lifecycle-aware route execution.
History++ explains navigation through route matching, context creation, guard checks, and lifecycle execution.
Matched routes receive params, query data, navigation type, and user-provided state.
canLeave can block unsafe movement and restore URLs during blocked pop navigation.
Registered middleware runs before route guards and lifecycle handlers.
Each example isolates one navigation idea so behavior is easy to inspect.
History++ explores the idea that native browser navigation can become a richer runtime layer when route lifecycle, guards, middleware, and matching are kept small and explicit.