Skip to content

react-form breaking change present in v1.27.2 #1998

@SavePointSam

Description

@SavePointSam

Describe the bug

Similar to #1828, React 17 compatibility was broken with #1913 after being corrected in v1.27.0. Due to the issue resolved in v1.27.4, we are currently locked to v1.23.7.

ERROR in ../project/node_modules/@tanstack/react-form/dist/esm/useFormId.js 3:67-78
export 'useId' (imported as 'React') was not found in 'react' (possible exports: Children, Component, Fragment, Profiler, PureComponent, StrictMode, Suspense, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, cloneElement, createContext, createElement, createFactory, createRef, forwardRef, isValidElement, lazy, memo, useCallback, useContext, useDebugValue, useEffect, useImperativeHandle, useLayoutEffect, useMemo, useReducer, useRef, useState, version)
 @ ../project/node_modules/@tanstack/react-form/dist/esm/useForm.js 9:0-43 21:25-34
 @ ../project/node_modules/@tanstack/react-form/dist/esm/index.js 6:0-39 7:0-101
 @ ..

Your minimal, reproducible example

I'm unable to re-create this in codesandbox using react-scripts

Steps to reproduce

  1. Create new React 17 project using webpack
  2. Install @tanstack/[email protected]
  3. Attempt to use library
  4. See crash

Expected behavior

Application is able to be built and run with React 17 and react-form v1.27.2+

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

OS: macOS
Bundler: Webpack 5

TanStack Form adapter

react-form

TanStack Form version

v1.27.2

TypeScript version

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions