Skip to content

Commit 61f2cbf

Browse files
committed
chore: Move adapter to Remix root (wrapping Outlet)
1 parent 151f2eb commit 61f2cbf

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

Diff for: packages/adapters/remix/app/root.tsx

+6-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
Scripts,
77
ScrollRestoration
88
} from '@remix-run/react'
9-
9+
import { NuqsAdapter } from 'nuqs/adapters/remix'
1010
import './tailwind.css'
1111

1212
export const links: LinksFunction = () => [
@@ -41,5 +41,9 @@ export function Layout({ children }: { children: React.ReactNode }) {
4141
}
4242

4343
export default function App() {
44-
return <Outlet />
44+
return (
45+
<NuqsAdapter>
46+
<Outlet />
47+
</NuqsAdapter>
48+
)
4549
}

Diff for: packages/adapters/remix/app/routes/_index.tsx

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import type { MetaFunction } from '@remix-run/node'
2-
import { NuqsAdapter } from 'nuqs/adapters/remix'
32
import { CounterButton } from '../components/counter-button'
43
import { SearchInput } from '../components/search-input'
54

@@ -31,10 +30,8 @@ export default function Index() {
3130
/>
3231
</div>
3332
</header>
34-
<NuqsAdapter>
35-
<CounterButton />
36-
<SearchInput />
37-
</NuqsAdapter>
33+
<CounterButton />
34+
<SearchInput />
3835
</div>
3936
</div>
4037
)

0 commit comments

Comments
 (0)