question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to enabled the new JSX transform of react 17.0?

See original GitHub issue

I wonder if its already possible to use the new JSX transform of react 17.0 in react-native projects.

I have updated the TS compiler to 4.1.2 but it seems more changes are required. Something needs to be added to the metro.config.js?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:6

github_iconTop GitHub Comments

1reaction
cesargdmcommented, Apr 19, 2021

@yfunk Oh the odds 😅

I would also comment that I had to reset my metro cache by doing npm start -- --reset-cache

Answer on: https://github.com/facebook/metro/issues/646

👍🏽 happy coding!

1reaction
yfunkcommented, Apr 19, 2021

@cesargdm I was just about to hit send on the same answer 😄

@pke Also make sure to change the compiler option jsx to 'react-jsx' in tsconfig.json and disable 'react/jsx-uses-react' and 'react/react-in-jsx-scope' if you are using ESLint.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Introducing the New JSX Transform – React Blog
Manual Babel Setup​​ First, you'll need to update to the latest Babel and plugin transform. Starting from Babel 8, "automatic" will be the ......
Read more >
How to enable new JSX transform in React?
How to enable new JSX transform in React? #javascript #react #babel #tutorial. The biggest feature of React 17 ...
Read more >
Enable the new JSX Transform in React Native 0.64
Enable the new JSX Transform in React Native 0.64 · import React. at the top of every file. · ReferenceError: Property 'React' doesn't...
Read more >
React.js 17: No New Features and New JSX Transform
One of the greatest internal improvements React 17 has is the new JSX transform. Prior to React 17, when you write JSX code,...
Read more >
React 17: New JSX Transform - JavaScript in Plain English
React 17, 16.4, 15.7, and 0.14.10 released a new feature that no longer requires importing React to transform JSX. This is a comprehensive...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found