Transform JSX in the browser
See original GitHub issueNow, Babel removed browser.js
from babel-core
.
https://github.com/babel/babel/commit/c0afdfd1a83aab0c25a1fc23cee0b09d560f4d35
React Getting Started
documentation is using browser.js
of babel-core 5.8.23.
http://facebook.github.io/react/docs/getting-started.html
Do you have any plan for supporting JSX transformer for the browser? Will it be deprecated?
Thanks.
Issue Analytics
- State:
- Created 8 years ago
- Comments:38 (20 by maintainers)
Top Results From Across the Web
Introducing the New JSX Transform – React Blog
Browsers don't understand JSX out of the box, so most React users rely on a compiler like Babel or TypeScript to transform JSX...
Read more >How transform JSX code in browser - reactjs - Stack Overflow
JSX is a syntax sugar over JavaScript. When you use jsx in browser, JSX transformer needs some time to transform jsx to javascript....
Read more >JSX Transformation Explained - JavaScript in Plain English
JSX transformation through Babel · 1. Initialize package.json file with npm init command. · 2. Then let's install @babel/cli , and @babel/core , ......
Read more >Running JSX in your browser without Babel
Just for fun, I wondering if I could run React + JSX code directly in a modern browser without transpilation and packaging.
Read more >babel/plugin-transform-react-jsx
Automatic runtime is a feature added in v7.9.0 . With this runtime enabled, the functions that JSX compiles to will be imported automatically....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@sebmck Am I missing something obvious here? The in-browser transformation is fairly critical to new users getting started. It is used in sample code to give people a first taste of JSX, is used in fiddles for debugging/testing/demoing, is used in a lot of places. It is even used on the reactjs homepage.
browser.js
seems like a fairly critical feature to me.Thanks! I actually decided to just not use JSX and you know what? It’s much easier for me to write straight JavaScript. Maybe it’s because I haven’t yet developed a large site with React, but I’m really not sure what JSX adds beyond making it easier for designers who are more familiar with html.
And the downsides are huge. Babel became a mess with version six and Webpack is kind of an odd choice for a package manger if you ask me. I give it only a year or two until that becomes almost unusable as well and then tons of people’s React projects will require major overhauls. Unless fb is going to pay its developers to work on those open source projects I see the dependencies as major liabilities.
Anyway, I’m pretty set for now 😃