4 ms·
For me the solution has been to pick a relatively popular library, work around the quirks, then just DONT UPGRADE the package. EVER. (Unless there is some real
by n0us 11y ago
For me the solution has been to pick a relatively popular library, work around the quirks, then just DONT UPGRADE the package. EVER. (Unless there is some real benefit to the end user or a security issue or something)
As a solo developer trying to bootstrap a startup I started out 8 months ago with React, I have had a reasonably good experience with React itself. For a pre 1.0 project it's surprisingly stable and once you figure out what you're doing I've been able to move relatively quickly.
The big holdup has been the supporting libraries. Some have been an absolute mess but the solution to that is that once I got it working, just don't touch it and don't buy into the promises that it's always going to be the next version that solves the issues. I didn't opt for Redux and went with Fluxxor instead which has worked reasonably well but I kept getting errors and ended up forking it to fix the problem. I'm not going to go back and use Redux for everything because someone told me it's better.
I am now on my 3rd build tool over this timeline. I am now on Webpack because people kept promising that the next one would be better. I struggled to finally get React-Hotloader to work and occasionally it works but most of the time I just get Invariant Violation errors and have to do a full reload. I had to jump through hoops to get this to work and enable CORS etc for virtually no benefit.
It will almost certainly be my last build tool for a while.
The pattern with JS from my viewpoint has been to overhaul entire libraries because it's not quite right.
It seems that what these developers don't realize is that when you solve one problem you often introduce another. Once you have a working solution there isn't really much incentive to change things. This guy laments that there is not a good way to do pure JS instead of JSX but you know what? JSX is fine. I already need a build tool to use ES6, and as long as you are consistent you shouldn't run into too many issues using the pure JS solution that comes with React if that's what you really want to do.
JSX might be ugly but I would rather just deal with the ugliness and settle for good enough then keep creating extra work for myself in search of perfect.
My goal is to build an app. I don't have the time or inclination to try out libraries like cycle or elm every time someone brags about how perfect they are just because they might provide me with a little benefit in terms of ease of development. I am perfectly fine with sitting back and reaping the benefit of other peoples' WWE-style back and forth even if I have to wait a year or more for things to stabilize.
- sotojuan 11y agoI've never used it, but I am surprised you haven't looked into Ember. It's a bigger cognitive load and might not be a good fit for small projects, but I feel like this recent blog post[1] was made for you. [1] https://medium.com/@jonpitch/ember-get-shit-done-36383c2ccc53#.71m1es8id https://medium.com/@jonpitch/ember-get-shit-done-36383c2ccc5...
- EvanPlaice 11y agoI hate to break it to you but WebPack is also riding the peak of a hype cycle right now. It doesn't natively support the future ES6-module standard. Once browsers start providing native module loading support, devs will likely migrate en masse to JSPM. JSPM is the (previously missing) package manager for front-end libraries. It supports transpiling (babel, traceur, typescript) out of the box and also handles bundling.
- Akkuma 11y agoWebPack 2.0 does support ES6 module import statements. In fact, it does tree shaking now too, but only if you use import {x} from foo.
- EvanPlaice 11y agoOh, cool. I didn't realize webpack 2 was released with ES6 module support. Import {x} from 'foo' Looks like it's going to be the spec for ES6 modules anyway so it's probably a good thing that you have to it for tree shaking.
- danabramov 11y ago>I struggled to finally get React-Hotloader to work and occasionally it works but most of the time I just get Invariant Violation errors and have to do a full reload. Have you considered reporting a bug?