Skip to content
masterclass Buddy

TanStack · Hook

useCanGoBack

useCanGoBack tells you whether TanStack Router can go back without leaving the application. It returns true when the router history is past its first entry and false at the first entry.

Last updated

Syntax

useCanGoBack()

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • useRouter
  • router.history.back
  • reloadDocument

Source: useCanGoBack hook | TanStack Router Docs. Checked 2026-11-03.