You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9db9dfd
Browse filesBrowse the repository at this point in the historyBrowse files
- Changeset no longer claims a peer dependency alone guarantees a single
runtime router instance; it points at the Vite dedupe/noExternal setup.
- Document that React Router v8 requires Node 22.22+ in the consuming app.
- Vite examples: `dedupe` belongs under `resolve`, not `optimizeDeps`.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: .changeset/react-router-v8-support.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,4 +2,4 @@
2
2
"@lambdacurry/forms": minor
3
3
---
4
4
5
-
Support React Router v8. `react-router` is now a peer dependency (`^7.0.0 || ^8.0.0`) instead of a bundled dependency, so consumers always share a single router instance with the library, and the unused `react-router-dom` dependency/peer was dropped (that package no longer exists in React Router v8).
5
+
Support React Router v8. `react-router` is now a peer dependency (`^7.0.0 || ^8.0.0`) instead of a bundled dependency, so the library resolves the router your application installs (keep the Vite `resolve.dedupe` / `ssr.noExternal` setup from the consumer guide so only one runtime instance is bundled), and the unused `react-router-dom` dependency/peer was dropped (that package no longer exists in React Router v8). React Router v8 requires Node 22.22 or newer.
Copy file name to clipboardExpand all lines: README.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,7 +68,7 @@ const MyTable = () => {
68
68
69
69
## React Router v7 / v8 Integration
70
70
71
-
`react-router` (v7 or v8) and `remix-hook-form` are peer dependencies: install them in your application so every package shares the single router instance your app provides.
71
+
`react-router` (v7 or v8) and `remix-hook-form` are peer dependencies: install them in your application so the library resolves the router your app provides. React Router v8 itself requires Node 22.22 or newer in the consuming application.
72
72
73
73
When using `@lambdacurry/forms` with `remix-hook-form` in a React Router v7 or v8 application, you need to configure Vite to bundle these packages together to share the router context. Without this, you may encounter the error:
Copy file name to clipboardExpand all lines: docs/consumer-setup-guide.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
This guide covers how to integrate `@lambdacurry/forms` with React Router v7 or v8 applications using remix-hook-form.
4
4
5
-
`react-router` (`^7 || ^8`) and `remix-hook-form` are peer dependencies of `@lambdacurry/forms`; install them in your application. The package no longer references `react-router-dom`, which was removed in React Router v8.
5
+
`react-router` (`^7 || ^8`) and `remix-hook-form` are peer dependencies of `@lambdacurry/forms`; install them in your application. The package no longer references `react-router-dom`, which was removed in React Router v8. React Router v8 requires Node 22.22 or newer.
6
6
7
7
## React Router Vite Configuration
8
8
@@ -34,11 +34,13 @@ export default defineConfig({
34
34
// CRITICAL: Bundle these packages with the app to share react-router context
|`ssr.noExternal`| Forces Vite to bundle `remix-hook-form`, `react-hook-form`, and `@lambdacurry/forms` with the application instead of treating them as external dependencies. This ensures they share the same `react-router` instance. |
51
53
|`optimizeDeps.include`| Pre-bundles these packages during dev, avoiding lazy loading that can cause context issues. |
52
-
|`optimizeDeps.dedupe`| Ensures only one copy of each package exists, preventing multiple React or react-router instances. |
54
+
|`resolve.dedupe`| Ensures only one copy of each package exists, preventing multiple React or react-router instances. |
0 commit comments