UNPKG

@tanstack/solid-router

Version:

Modern and scalable routing for Solid applications

10 lines (8 loc) 234 B
import * as Solid from 'solid-js' import { useRouter } from './useRouter' export function useCanGoBack() { const router = useRouter() return Solid.createMemo( () => router.stores.location.state.state.__TSR_index !== 0, ) }