Skip to content

[Suggestion]: Add tsconfig.json update to React 19 upgrade guide #6801

@JakeSaterlay

Description

@JakeSaterlay

Summary

To get the React 19 beta version working in a typescript project you have to modify your tsconfig.json types array to include react/canary.

Page

https://react.dev/blog/2024/04/25/react-19-upgrade-guide#installing

Details

To get the React 19 beta version working in a typescript project you have to add the following to your types array in the tsconfig compilerOptions object:

"types": ["react/canary"]

I couldn't see this in the upgrade guide, so could be worth adding a section to explain this is needed when working with React and Typescript

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions