5 ms·
This isn't JavaScript fatigue; this is CoolScript fatigue. Major Key: Avoid compile steps as long as possible. No Babel, no Webpack, no browserify, no JSX. Yo
by akamaozu 10y ago
This isn't JavaScript fatigue; this is CoolScript fatigue.
Major Key: Avoid compile steps as long as possible.
No Babel, no Webpack, no browserify, no JSX. You can use React without any of them. You'll get to them when you really need them eventually. Maybe. Only one of the above I use is browserify.
Why?
As a developer, your key job is keeping complexity down. Doesn't matter if everyone else implicitly gets it. If it's complex to you, don't feel forced to use it. If you can get by without it, do so. When you eventually get it, it wouldn't be that much of a struggle.
You'll still need to look up apis, function args and options, but that's just forgetting how to tell the computer what you want. Very different from not understanding why you need each piece or how to put them together.
- aprdm 10y agoAs an anecdote, I have been using react and react router with no jsx or transpiling for 6 months now and it works just fine. Dependencies are in index.html order ( crazy I know ), things follow a conventional folder structure and the project is about 100k LoC.
- cwsx 10y agoDo you really find it easier writing React without JSX, compared to just adding the JSX transpiler? I completely understand the overwhelming-ness of the JS ecosystem, but JSX is the one part I don't think I could live without.
- aprdm 10y agoFor ... Reasons I can't use npm or node in the platform I develop this project. After been using it without jsx for so long I kind of got used to it/ enjoy it more. I am also ditching jsx in my side projects. It's all just JavaScript and react API. Pretty straight forward. If you indent the render functions correctly I feel it's all good.
- akamaozu 10y agoReact + React Router + Browserify here, but nothing even close to 100k lines of code. Do you write about doing this in vanilla js? Would like to keep a collection of "Just React please" docs that I can point people to.
- aprdm 10y agoI feel the docs of Facebook are good enough and when I read some jsx examples I just map them to React.createElement in my mind. I can't write about the code I use at work, I could possibly write at home but I have other priories at the moment on my free time.
- akamaozu 10y agoThe translation from docs to plain js is really easy for me, but it seems we might be in the minority. Would have been nice to have something tangible to point others to ...
- git-pull 10y ago> As an anecdote, I have been using react and react router with no jsx or transpiling for 6 months now and it works just fine. Dependencies are in index.html order Any boilerplates on GH you can point out / something you could publish?
- deleted 10y ago[deleted]