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

useCanGoBack.ts

9 lines234 Bytes

1import * as Solid from 'solid-js'
2import { useRouter } from './useRouter'
3​
4export function useCanGoBack() {
5 const router = useRouter()
6 return Solid.createMemo(
7 () => router.stores.location.get().state.__TSR_index !== 0,
8 )
9}