Scratching the Surface: React.js

Hey y’all, i’m excited to give you guys a short snippet of my knowledge dealing with the library know as React.js! It’s a JavaScript library developed by Facebook used to listen to user actions and to help create dynamic user interfaces. It wants the user interface to be REACTive!

Tony Stark get it!

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!

**VIEWS** was alright…

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!

React is basically outputting HTML using JavaScript and that’s all! And it does that one thing well! It does this with “components” which are basically bundles of HTML & JavaScript. Components can get complicated but you learn that putting the HTML and JS together works well and leads to less of a complex work flow! After all JS & HTML seems to have been a match made in heaven!

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!

“Coding your libraries” Hour 10…

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!

In the end React.js seems like something every new developer should look into just to gain the knowledge of a thriving JavaScript library. It has it’s issues and some great benefits and as most things in a Web Dev’s toolkit, has a special place and time to be used!

“My momma said, my m-momma said, m-mymyyy momma said…” — Robert “Bobby” Boucher Jr.
One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.