History overview
Low-level Effect wrappers for History and its usage via Context.
Added in v8.19.0
Table of contents
actions
back
Go back in the history
Signature
export declare const back: Effect.Effect<void, never, History>
Added in v8.19.0
forward
Go forward in the history
Signature
export declare const forward: Effect.Effect<void, never, History>
Added in v8.19.0
getLength
Get the number of history entries
Signature
export declare const getLength: Effect.Effect<number, never, History>
Added in v8.19.0
getScrollRestoration
Get the current scroll restoration behavior
Signature
export declare const getScrollRestoration: Effect.Effect<ScrollRestoration, never, History>
Added in v8.19.0
getState
get the current state from the History object
Signature
export declare const getState: Effect.Effect<unknown, never, History>
Added in v8.19.0
go
Navigate to a delta in the history
Signature
export declare const go: (delta: number) => Effect.Effect<void, never, History>
Added in v8.19.0
pushState
Call pushState on the History object
Signature
export declare const pushState: (url: string | URL, data?: unknown) => Effect.Effect<void, never, History>
Added in v8.19.0
replaceState
Call replaceState on the History object
Signature
export declare const replaceState: (url: string | URL, data?: unknown) => Effect.Effect<void, never, History>
Added in v8.19.0
setAutoScrollRestoration
Get the current scroll restoration behavior to “auto”
Signature
export declare const setAutoScrollRestoration: Effect.Effect<void, never, History>
Added in v8.19.0
setManualScrollRestoration
Get the current scroll restoration behavior to “manual”
Signature
export declare const setManualScrollRestoration: Effect.Effect<void, never, History>
Added in v8.19.0
setScrollRestoration
Set the current scroll restoration behavior
Signature
export declare const setScrollRestoration: (scrollRestoration: ScrollRestoration) => Effect.Effect<void, never, History>
Added in v8.19.0
context
History
A Context for the globalThis object
Signature
export declare const History: Context.Tagged<History, History>
Added in v8.19.0
models
History (interface)
A Context for the History object
Signature
export interface History extends globalThis.History {}
Added in v8.19.0