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.

`.jsx` extension cannot be used with React Native

See original GitHub issue

Since .jsx extension cannot be used with React Native (Cf. facebook/react-native#5233), if someone wants to use this config with React Native, the rule react/jsx-filename-extension should be set to .js only instead of .jsx only.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:23
  • Comments:20 (1 by maintainers)

github_iconTop GitHub Comments

104reactions
ljharbcommented, Aug 2, 2016

@borisyankov “what’s common” isn’t the primary motivator for this guide, it’s “what we use at Airbnb”. We believe that .js files should only ever contain actual, standard JavaScript, and JSX is decidedly not that.

58reactions
ljharbcommented, Oct 12, 2016

"react/jsx-filename-extension": ["error", { "extensions": [".js", ".jsx"] }]

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to allow react-native to enable support for JSX (extension ...
RN 0.59 requires a config file called metro.config.js in the root level. I have to use it to enable JSX support instead of...
Read more >
Enabling .jsx files in React Native - Mandy's Tech Blog
Although the core React Native team doesn't show any signs of reversing their stance, it is possible in recent versions to extend the...
Read more >
You can't use a jsx extension in React Native projects - Jair Trejo
The actual problem is that React Native doesn't support the JSX extension. Rename your file to App.js and it'll work just fine. All...
Read more >
Introducing JSX - React
It is called JSX, and it is a syntax extension to JavaScript. We recommend using it with React to describe what the UI...
Read more >
JSX in React – Explained with Examples - freeCodeCamp
JSX is a JavaScript Extension Syntax used in React to easily write ... an HTML tag to a variable that is not a...
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