-
-
Notifications
You must be signed in to change notification settings - Fork 538
Open
Labels
Description
Describe the bug
With the introduction of this PR, React 17 compatiblity has been broken. React 17 does not include the useId hook.
TypeError: (0 , $csb__react.useId) is not a function
at useForm (/node_modules/@tanstack/react-form/dist/esm/useForm.js:24:40)
at App (/src/index.tsx:28:39)
at renderWithHooks (/node_modules/react-dom/cjs/react-dom.development.js:14985:18)
at mountIndeterminateComponent (/node_modules/react-dom/cjs/react-dom.development.js:17811:13)
at beginWork (/node_modules/react-dom/cjs/react-dom.development.js:19049:16)
at HTMLUnknownElement.callCallback (/node_modules/react-dom/cjs/react-dom.development.js:3945:14)
at Object.invokeGuardedCallbackDev (/node_modules/react-dom/cjs/react-dom.development.js:3994:16)
at invokeGuardedCallback (/node_modules/react-dom/cjs/react-dom.development.js:4056:31)
at beginWork$1 (/node_modules/react-dom/cjs/react-dom.development.js:23964:7)
at performUnitOfWork (/node_modules/react-dom/cjs/react-dom.development.js:22776:12)
at workLoopSync (/node_modules/react-dom/cjs/react-dom.development.js:22707:5)
at renderRootSync (/node_modules/react-dom/cjs/react-dom.development.js:22670:7)
at performSyncWorkOnRoot (/node_modules/react-dom/cjs/react-dom.development.js:22293:18)
at scheduleUpdateOnFiber (/node_modules/react-dom/cjs/react-dom.development.js:21881:7)
at updateContainer (/node_modules/react-dom/cjs/react-dom.development.js:25482:3)
at eval (/node_modules/react-dom/cjs/react-dom.development.js:26021:7)
at unbatchedUpdates (/node_modules/react-dom/cjs/react-dom.development.js:22431:12)
at legacyRenderSubtreeIntoContainer (/node_modules/react-dom/cjs/react-dom.development.js:26020:5)
at render (/node_modules/react-dom/cjs/react-dom.development.js:26103:10)
at $csb$eval (/src/index.tsx:134:22)
at H (sandbox.20ab159c9.js:1:95133)
at K.evaluate (sandbox.20ab159c9.js:1:107852)
at ve.evaluateTranspiledModule (sandbox.20ab159c9.js:1:118233)
at ve.evaluateModule (sandbox.20ab159c9.js:1:117732)
at sandbox.20ab159c9.js:1:284958
at Generator.next (<anonymous>)
at r (common-sandbox.4915834c1.chunk.js:1:606)
at a (common-sandbox.4915834c1.chunk.js:1:817)
Your minimal, reproducible example
https://codesandbox.io/p/sandbox/3hdf98
Steps to reproduce
- Create new React 17 project
- Install @tanstack/react-form
- Attempt to use library
- See crash
Expected behavior
Simple example from @tanstack/react-form works with React 17. Expected support with React 17 per peerDependency list.
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
- OS: macOS
- Browser: Microsoft Edge
- Version: 141.0.3537.99
TanStack Form adapter
react-form
TanStack Form version
v1.23.8
TypeScript version
No response
Additional context
No response