I've been developing React.js applications for a few years now and I find it impressive how the architecture React promotes works so well for large scale and long term app development, even today within the turmoil that web development has become.
The reason I keep going to React.js for my day-to-day and the main sauce of why I keep promoting it is the fact that I like to work in big projects with big budgets. It's that plain and simple.
When combined with an appropriate packaging and repo management strategy (i.e. currently loving the mono-repo model promoted by Babel's lerna which plays wonderfully with Webpack), React's ability to create reusable digital legos is what web development had been trying to achieve for almost two decades prior (remember MVC? *shudders*) and is still currently unable to top.
This ability to create reusable components makes it easy not only to scale apps, but development teams as well.
Another big factor in the "why i currently love React" equation is the ease with which a web app can be translated to mobile with React Native.
Still, React.js' worst enemy is itself, or rather how steep its learning curve is.
I still meet hopeful junior developers who've tried jumping in the deep-end of JS development by attempting to create a "simple hello world" in React only to find themselves drowning under the sea of info needed in order for
$ webpack build to yield a proper (error free) result.
Just think about it:
- Hello world in Node:
- head on over to Node.js website, download node and install it
$ nodein your terminal of choice
console.log('hello world')and hit ENTER
- Hello world in React:
- Install Node
- Install Babel (wait what is that?)
- Install Webpack and configure it using the webpack.config (wait, config? what does webpack do again? is it the web server?)
- Install Yarn and add your dependencies (Yarn? why not just
$ npm install --save?)
You're probably catching my drift.
Most seasoned devs have already created their own flavor of the infamous React.js boilerplate (myself included), and most of the times the reasoning behind that effort is simple enough:
"I never want to have to deal with configuring a React app from scratch ever again."
I've even gone as far as to use my boilerplate to setup a "playground" in my machine to be the "one React app to rule them all", which I use to create both useful and frugal components in my spare time. Someday I might even move it online.
But even then, sometimes I have a simple idea which I want to publish quickly. Then React.js actually gets in the way. The most recent example was an audio player I wanted to have online to share songs from my music project Steady Noise Machine. I ended up just making it in plain HTML, CSS, and vanilla JS using AmplitudeJS.
In all seriousness, even to this day I try not to marry any given framework. I'll just as easily build an app using Angular, Vue, Ember, Meteor, etc. But at the end of the day, I'll keep favoring React.js, if only to have some peace of mind about the long-term effectiveness of my code in this world.