Scratching the Surface: React.js
So the big thing that I had to understand with React.js (React for short) was is that it is not a MVC framework! If you didn’t know, which I didn’t, MVC stands for Model-View-Controller. This means that the software application for the framework is split up into 3 interconnected parts: (You guessed it) Model, View, and Controller. This is done to separate their internal info from what is presented to the user. Just kinda simplifying it all?
Think of React as just “V” in “MVC”! It ONLY deals with the Views!
Only using the View layer makes React concerned with “rendering the user interface” and making it an incomplete framework (unlike Angular). Also only being for the view means that we don’t get some things such as: an event system, AJAX capabilities, or any kind of application framework! The list can go on. Making it kind of difficult to build fully functioning applications with right out of the box. We can save that story for another time!
There have been some mixed feelings about React.js since the start, not only is it only for the view, but one of the more negative ones is that it doesn’t give enough bang for your buck! It is such a large file (about 35kb zipped), it is about the same size as Angular which is a complete framework. If you aren’t getting into too much dynamic design then it may feel like more work then needed. Other cons seem to be that it has awful documentation, it is a slow start, and that it is still young! Meaning you might have to build your own libraries from scratch! Yikes!
Nonetheless, There must be some good reason to use React.js? Of course there are! Or else no one would give it the time of day. It is said to be great for working on a team, it is all on one file source for easy usage. Using JSX to markup and package the HTML and JS into “components” makes it a much neater process. One reason that caught my eye was that it was fast! This is done because React is rendered server-side instead of the client-side! It does this out of the box instead of having another software to do it for you, or even worse paying money for it! This allows for huge performance boosts and that is always awesome!