Skip to content

Bug: Shows error when jsx is react-jsx in tsconfig instead of react #20391

@bineetNaidu

Description

@bineetNaidu

React version: 17.0.1

Steps To Reproduce

  1. npx create-react-app [your project name] --template typescript
  2. set target in tsconfig to ESNEXT

The current behavior

In VS Code their is many syntax error highlight and it says "Cannot use JSX unless the '--jsx' flag is provided.ts(17004)"

The expected behavior

It Should be normal like other version of react usage

Screenshots

tsconfig.json
Screenshot from 2020-12-07 17-09-22
index.tsx
Screenshot from 2020-12-07 17-10-37

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