Open
Description
Bug report
Current Behavior
I use the latest formik release with React v19, specifically "@types/react": "^19.0.1"
and I get 4 errors like:
node_modules/formik/dist/types.d.ts:209:109 - error TS2503: Cannot find namespace 'JSX'.
209 export type GenericFieldHTMLAttributes = JSX.IntrinsicElements['input'] | JSX.IntrinsicElements['select'] | JSX.IntrinsicElements['textarea'];
Expected behavior
No type errors.
Suggested solution(s)
s/JSX/React.JSX
Additional context
https://react.dev/blog/2024/04/25/react-19-upgrade-guide#the-jsx-namespace-in-typescript
It's only about typings anyway. In @react/types
, this was backported also to the v16 series, so the proposed change doesn't require React v19 to work.
Your environment
Software | Version(s) |
---|---|
Formik | 2.4.6 |
React | 19.0.0 |
TypeScript | 5.5.4 |
npm/Yarn | npm 10.9.0 |
Operating System | Kubuntu |
Activity