Skip to content
Source
Sign inSign up
TanStack/router
Open History to see the last commit

useCanGoBack.ts

5 lines165 Bytes

1import { useRouterState } from './useRouterState'
2​
3export function useCanGoBack() {
4 return useRouterState({ select: (s) => s.location.state.__TSR_index !== 0 })
5}