5 ms·
We think ES6 is not the problem here. It’s just a language, and arguably a better one than ES5. The problem is the low level tooling around it. This is what we
by danabramov 10y ago
We think ES6 is not the problem here. It’s just a language, and arguably a better one than ES5.
The problem is the low level tooling around it. This is what we’re trying to fix with this project. Hopefully you’ll give it a go, and maybe it will give you just as much enjoyment as using <script> tags. If not, please let us know how we can improve.
It’s not linting/transpilation/bundling that’s bad, it’s that it’s hard to do them without shooting yourself in the foot.
- sotojuan 10y agoI definitely use ES6 for sure, though nothing too crazy (no decorators, bind :: thingy, etc). Do you remember how you were telling people on Twitter that they don't need every single crazy feature and every single thing in the Redux store (or even Redux at all) to do React? The kind of people I am complaining about are the ones that say the opposite.
- Touche 10y agoI think the problem is that React is developed as more of a Node/JavaScript project than as a web project. You see this in stuff like depending on `process`, a thing that exists in Node but not on the Web. So the Web is a compilation target; not the platform that React is developed for. From there it's easy to think about everything in terms of JavaScript, and not making the Web the intended target for usage.
- enraged_camel 10y agoYeah, along these lines, I also hate how most of the examples/tutorials online assume your server is Node.js. I'd love to find some official documentation on the best ways to use it with Asp.net and Rails, for example.
- pests 10y agoThat's usually because those tutorials are also setting up sever side rendering. Node.js is only needed for that and for running the various (optional) build tools. When doing a SPA I often set up Node.js to serve the index and provide server-side rendering and then never touch it again. Any actual API/WebSockets/RPC interfaces the app needs can be serviced by any plain old Ruby, Python, PHP, etc app backend. Since I usually use PHP from old habits, I use a Symfony API-only application. I posted about this in a top level comment, but don't forget React can control any element in your DOM and not just the entire body like most SPA's are setup. You can continue using whatever languages/frameworks templating and view systems and augment views as needed that would be better handled by React.
- seangrogg 10y agoOh no, I love (most of) ES6 and enjoy it when something shows green on caniuse. But I dropped Babel/Webpack from my build and (personally) determined that not needing to deal with configuration, deprecation, etc. messages in my terminal was worth the +0.005s to initial render and using <script> tags in my index.html file. That being said, I'll likely give this a spin tonight for somerandomcrappyidea.js and provide you guys some feedback. Unfortunately, my work at Google has me more focused on Angular so I don't have as much time as I'd like to work on React applications. =< As an aside, thanks for the work you've done on Redux and the talk that you gave at Hack Reactor!
- aith 10y agoAre you still using JSX? Even a very minimal babel/webpack setup like this one has really sped up my productivity, but I'm interested in the alternatives...