Skip to content

Commit 3fd1a6a

Browse files
committed
doc: Add reloadPageOnShallowFalseUpdates docs
1 parent 59de8ee commit 3fd1a6a

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

packages/docs/content/docs/adapters.mdx

+19
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,25 @@ createRoot(document.getElementById('root')!).render(
8686
)
8787
```
8888

89+
Note: because there is no known server in this configuration, options
90+
like [`shallow: false{:ts}`](./options#shallow) will have no effect.
91+
92+
Since `nuqs@2.4.0`, you can specify a flag to perform a full-page navigation when
93+
updating query state configured with `shallow: false{:ts}`, to notify the web server
94+
that the URL state has changed, if it needs it for server-side rendering other
95+
parts of the application than the static React bundle:
96+
97+
```tsx title="src/main.tsx" /reloadPageOnShallowFalseUpdates/
98+
createRoot(document.getElementById('root')!).render(
99+
<NuqsAdapter reloadPageOnShallowFalseUpdates>
100+
<App />
101+
</NuqsAdapter>
102+
)
103+
```
104+
105+
This may be useful for servers not written in JavaScript, like Django (Python),
106+
Rails (Ruby), Laravel (PHP), Phoenix (Elixir) etc...
107+
89108
## Remix
90109

91110
```tsx title="app/root.tsx"

0 commit comments

Comments
 (0)