-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeScript type error with React 19 types #1823
Comments
Can you check if this addressed that issue? #1822 |
@adrai Exactly! |
addressed in v15.2.0 |
@adrai works for me, thank you! |
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [react-i18next](https://github.com/i18next/react-i18next) | dependencies | minor | [`15.1.4` -> `15.2.0`](https://renovatebot.com/diffs/npm/react-i18next/15.1.4/15.2.0) | --- ### Release Notes <details> <summary>i18next/react-i18next (react-i18next)</summary> ### [`v15.2.0`](https://github.com/i18next/react-i18next/blob/HEAD/CHANGELOG.md#1520) [Compare Source](i18next/react-i18next@v15.1.4...v15.2.0) This version may be breaking if you still use React < v18 with TypeScript. For JS users this version is equal to v15.1.4 - fix: Global JSX namespace is deprecated [1823](i18next/react-i18next#1823) with [1822](i18next/react-i18next#1822) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS44MC4wIiwidXBkYXRlZEluVmVyIjoiMzkuODAuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIl19--> Reviewed-on: https://git.tristess.app/alexandresoro/ouca/pulls/404 Reviewed-by: Alexandre Soro <[email protected]> Co-authored-by: renovate <[email protected]> Co-committed-by: renovate <[email protected]>
Typescript React follows these steps: npm install -g typescript then npm uninstall react react-dom then npm install react@18 react-dom@18 then npm install --no-audit --save @testing-library/jest-dom@^5.14.1 @testing-library/react@^13.0.0 @testing-library/user-event@^13.2.1 @types/jest@^27.0.1 @types/node@^16.7.13 @types/react@^18.0.0 @types/react-dom@^18.0.0 typescript@^4.4.2 web-vitals@^2.1.0 then npx tsc --init then npx tsc --build --clean then npm install --save-dev typescript then open the tsconfig.json { then goto src/App.tsx comment 2nd line comment 9th line then npm start or you can go with this YouTube link: https://youtu.be/_0_kW0xI7P8?si=JWDu0Lyskflmdjol |
🐛 Bug Report
Type error with React v19 types. The global type namespace
JSX
has been removed for better compatibility with other JSX libs.https://react.dev/blog/2024/04/25/react-19-upgrade-guide#the-jsx-namespace-in-typescript
To Reproduce
just use
@types/react
v19 andreact-i18next
in a project, and runtsc
(withoutskipLibChecks
).Expected behavior
no type error
Your Environment
The text was updated successfully, but these errors were encountered: