3 ms·
My claim of "you only need two script tags to write a working React app" is entirely accurate. That _does_ limit you to just `React.createElement()`, which is
by acemarke 8y ago
My claim of "you only need two script tags to write a working React app" is entirely accurate.
That _does_ limit you to just `React.createElement()`, which is the core React API.
If you don't want to call `React.createElement()` every time (whether or not you alias to to something like `h()`), then you either use JSX (and a build step), or one of the other options like the ones I listed.
Pointing at that, and then claiming it's insufficient for "building an entire house", makes it look like there's some goalposts being shoved down the field.
- pdimitar 8y agoThe goalpost is -- and always should be -- to build a working app without pretending you don't need a ton of dependencies. You do, unless you have a much bigger time budget than most of us. We can do only so much with a limited toolset. By your analogy, we should only be able to make a working app with `document.write()`. Let's be realistic. A pair of script tags is only theoretically possible and nobody is stopping at that.
- acemarke 8y agoI never made any claims about what other tools you _might_ need to build "real world"-ish apps. I'm only saying that you don't actually need anything else, including build setups, to be able to write working React code, because that's a common misunderstanding about React. Folks assume you _have_ to have Webpack and Babel to use it.
- vinnymac 8y agoAdditionally if you find local development unpleasant you can always try remote development via something like https://codesandbox.io/ https://codesandbox.io/ which will setup a project with everything you need.
- xg15 8y agoTechnically true, but that point isn't really meaningful if the amount of tooling you realistically need to build an app keeps on growing. In theory I only need gcc, vim and a bunch of header files to write the next Chrome as well.