Skip to main content

useChaynsHistoryState

Callable


  • Returns the current layer state and a setter. Re-renders only when the own-state changes (shallow comparison performed by layer).


    Type parameters

    • T: object = Record<string, unknown>

    Returns [T | undefined, (state: T, opts?: ChaynsHistoryNavigateOptions) => void]