Re:What React Gets Wrong
by dragonwriter on Thursday January 07, 2021 @05:38PM
(#25678656)
> They could have made React lighter and require no compilation.
React requires no compilation. (JSX requires compilation, but you can use React without JSX.)
> But instead they created a scaffold and fought complexity by adding more complexity.
CRA is a scaffold, but you don’t need to use CRA to use React.
Re:What React Gets Wrong
by loosetypes on Thursday January 07, 2021 @06:20PM
(#25679045)
> React requires no compilation. (JSX requires compilation, but you can use React without JSX.)
While true I don’t know that I’ve ever seen a non-didactic codebase that uses react but not jsx.
Can anyone point to any recognizable projects or products that do so?
Re:What React Gets Wrong
by nemothekid on Thursday January 07, 2021 @05:40PM
(#25678674)
I'm not following your logic. React+ReactDom only has 3 dependencies, so I don't understand how that follows. How is React bloated because `create-react-app` gives you functionality to setup a PWA? If I don't care about PWAs, I don't need to use it, but `create-react-app` downloads it anyways.
The majority of the dependencies pulled in on create-react-app is from the `react-scripts` which helps entirely with scaffolding. Saying that React is bloated because the scaffolding generation tool downloads too much code sounds crazy.
React does not require compilation.
You don't need to compile React, and compiling `jsx` is just a couple lines. Clearly there's something being missed here about the function of create-react-app. It's an application development environment. React itself is quite secondary to its purpose.
They could have made React lighter and require no compilation. But instead they created a scaffold and fought complexity by adding more complexity.