ReactJS: Rest for the Weary
Some years back while I was still in college my first internship came to an end. Although I had been programming from when I was a young teenager, this internship had brought me to web development. At this point I was still quite like a traveller without a map. I had some idea of what was possible, but hardly even knew enough to get started with anything. I had some ideas around a website that I wanted to make but no idea of what technologies to use. At that point my only real experience was using in-house software that I no longer could use.
Starting with a google search, and with all the passion in the world, I began ill fated attempts to utilize some then-modern JavaScript libraries and some not so modern attempts on how to serve the website (full stack frameworks, Platform as a Service, Amazon Web Services, etc... were not in my vocabulary at that point).From 0 to 60
It was a bit of a crazy journey from there both personally but also professionally. I went from internship to internship, fell in love with Ruby, fell into a habit of implementing every idea with Ruby on Rails (for better or for worse) and was always learning. At this point I had used but not loved Backbone, Angular, Node, and many other libraries and frameworks. In this same time period I graduated college, and landed my first full time job as a web developer.
Being Weary
All of the frameworks and libraries I had used tried to be two or more things at once. In the case of Angular it tries to be a full on client side framework, which not only has conceptual suggestions on how to do things, but real restrictions on how to do everything you do. For many projects this was a good thing, but for the same reason it could never be my go-to solution. Some even take this to the server side (Meteor), and in these cases when it comes to going from development / concept to production the ease of access of making that todo app seems less important. Finally others, even though they do not try to be a full framework, they still attempt to solve two distinct problems in two distinct pieces such as Model - View (Backbone).
Finding Rest
The fact that the React documentation defines what a component is and then says, "This function is a valid React component because..." illustrates the point very clearly. The idea is that a React Component is a JavaScript concept first, before it is a JavaScript library or class. In addition, that concept is bound by the conceptual limits of JavaScript. That quote goes on to say, "it accepts a single 'props' object argument with data and returns a React element." React doesn't try to be meta-JavaScript. it is just a JavaScript library for constructing user interfaces.
In some sense all you need to have in order to be "doing React" is to have a function that returns a React element. Ultimately this means that you can take almost any chunk of poorly written JavaScript and replace it with a React component. No need to create an entire Eiffel tower making that single component work, just include the library.
I hope this helps!
Oh and by the way, one caveat: JSX is a JavaScript language extension that helps with writing clean React code. Obviously this breaks many of the things we mentioned above. This is very much "meta-JavaScript" and requires changes to how you deliver your JavaScript. However I have not found this to be a big deal, and once it is setup, all the benefits I mentioned hold true once again.