TX014
Used outside <AppRouter>
Why this happens
useRouter, usePathname, useParams, useSearchParams, useAppTheme and <Link> read state that <AppRouter> provides. The component rendered outside of it, usually in a standalone renderToConsole call or a unit test.
How to fix it
Run the app with text dev, text start or text run, which mount <AppRouter> for you. When rendering by hand (tests, embeds), mount the router instead of the page:
import { AppRouter } from "@textjs/next/router";await renderToConsole(<AppRouter routes={routes} />);