by whyevenbother · 8y ago · 0 comments
I hate this misconception and wish it would just go away.
If you're referring to Create React App, it uses Webpack - just preconfigured so you don't have to fiddle with it before you start building.
isn't this just a little bit disingenuous
The other comment gives a perfect example and there are a few tutorials (although I do agree not very mainstream) that teach React without JSX/Webpack/Babel/etc.
edit: You are correct that you need transpilation for JSX but you don't need JSX for React. The confusion of JSX/React sounds eerily similar to how newbies confused jQuery for JS.
JS was not created for JQuery, and you can not used JQuery without JS.
Unfortunately it uses ES6 features. There's no ES3/ES5 demo without JSX -- https://reactjs.org/docs/react-without-es6.html uses JSX
As an aside, is that really a problem these days? All modern browsers now offer comprehensive native ES6 support. Unless you still need to support older platforms like IE or some of the legacy mobile browsers, it's mostly a non-issue.
Not recommended for large projects in production (but then I'd be using webpack or similar for large vue projects too), but it works pretty well (and surprisingly fast) for quick experiments.
In this lesson I cover JSX:
https://github.com/kay-is/react-from-zero/blob/master/02-jsx...