Skip to content

Commit e57c9ab

Browse files
committed
doc: Wording
1 parent e8950c6 commit e57c9ab

File tree

2 files changed

+8
-16
lines changed

2 files changed

+8
-16
lines changed

Diff for: packages/docs/content/docs/about.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Up to you. I say "nukes". _`[njuks]`_
2929

3030
### What does it mean?
3131

32-
**Never underestimate query strings**.
32+
> **Never underestimate query strings**.
3333
3434
Kidding aside, it's the initials of the original name, `Next-UseQueryState`.
3535

Diff for: packages/docs/content/docs/migrations/v2.mdx

+7-15
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Here's a summary of the breaking changes in `nuqs@2.0.0`:
88
- [Enable support for other React frameworks](#adapters)
99
- [ESM-only package](#esm-only)
1010
- [Deprecated exports have been removed](#deprecated-exports)
11-
- [Renamed `nuqs/parsers` to `nuqs/server`](#renamed-nuqs-parsers-to-nuqs-server)
11+
- [Renamed `nuqs/parsers` to `nuqs/server`](#renamed-nuqsparsers-to-nuqsserver)
1212
- [Debug printout detection](#debug-printout-detection)
1313

1414
## Adapters
@@ -39,8 +39,7 @@ See #423 for context and a table of supported versions.
3939

4040
#### App router
4141

42-
```tsx
43-
// src/app/layout.tsx
42+
```tsx {1} /NuqsAdapter/ title="src/app/layout.tsx"
4443
import { NuqsAdapter } from 'nuqs/adapters/next/app'
4544
import { type ReactNode } from 'react'
4645

@@ -61,8 +60,7 @@ export default function RootLayout({
6160

6261
#### Pages router
6362

64-
```tsx
65-
// src/pages/_app.tsx
63+
```tsx {2} /NuqsAdapter/ title="src/pages/_app.tsx"
6664
import type { AppProps } from 'next/app'
6765
import { NuqsAdapter } from 'nuqs/adapters/next/pages'
6866

@@ -75,26 +73,20 @@ export default function MyApp({ Component, pageProps }: AppProps) {
7573
}
7674
```
7775

78-
<details>
79-
<summary>
80-
81-
#### Next.js (unified)
76+
#### Unified (router-agnostic)
8277

83-
</summary>
84-
85-
If your Next.js app uses both the app _and_ pages routers, you can use
86-
the unified adapter if it needs to be mounted in either routers, at the cost
78+
If your Next.js app uses **both the app and pages routers** and the adapter needs
79+
to be mounted in either, you can use the unified adapter, at the cost
8780
of a slightly larger bundle size (~100B).
8881

8982
```tsx
9083
import { NuqsAdapter } from 'nuqs/adapters/next'
9184
```
9285

93-
</details>
9486

9587
### React (with Vite)
9688

97-
```tsx
89+
```tsx /NuqsAdapter/
9890
import { NuqsAdapter } from 'nuqs/adapters/react'
9991

10092
createRoot(document.getElementById('root')!).render(

0 commit comments

Comments
 (0)