fix(docs): correct setup step ordering for StackProvider before StackHandler

StackHandler, useUser, and useStackApp all depend on StackProvider.
The previous ordering had handlers before providers, which caused
runtime errors when users followed the manual setup instructions.
This commit is contained in:
promptless[bot] 2026-04-24 19:31:01 +00:00
parent d1751a7634
commit 7387c677ad

View File

@ -117,10 +117,22 @@ We recommend using our **setup wizard** for JavaScript frameworks for a seamless
title="Stack Configuration"
/>
<Step>
### Add providers (Next.js and React only)
</Step>
For Next.js and React, wrap your app with Stack providers. This step is required before using `StackHandler`, `useUser`, or `useStackApp`—without it you'll get a runtime error.
<PlatformCodeblock
document="setup/setup"
examples={["app-providers"]}
title="App Providers"
/>
<Step>
### Set up authentication handlers (Frontend frameworks only)
</Step>
For JavaScript frameworks, create the authentication handler:
<PlatformCodeblock
@ -129,18 +141,6 @@ We recommend using our **setup wizard** for JavaScript frameworks for a seamless
title="Authentication Handlers"
/>
<Step>
### Add providers (Next.js and React only)
</Step>
For Next.js and React, wrap your app with Stack providers:
<PlatformCodeblock
document="setup/setup"
examples={["app-providers"]}
title="App Providers"
/>
<Step>
### Add loading boundary (Next.js only)
</Step>