Skip to main content

useHistory

Datalayer Core


Datalayer Core / useHistory

Function: useHistory()

useHistory(): object

Defined in: tech/datalayer/core/src/hooks/useLocation.tsx:110

Hook to get history functions Detects and uses React Router history when available, falls back to browser history

Returns​

object

back()​

back: () => void

Returns​

void

forward()​

forward: () => void

Returns​

void

push()​

push: (to, state?) => void

Parameters​

to​

string

state?​

any

Returns​

void

replace()​

replace: (to, state?) => void

Parameters​

to​

string

state?​

any

Returns​

void