Intro To React
March 05, 2020
What is react?
React has become one of the most popular frontend JavaScript frameworks in the world since its release in 2013. Tons of websites have been built in it, there are a huge number of jobs that want it, and it’s pretty fun to work in as well.
But what is it, and why does it seem like everyone has gone head over heels for React?
React was developed and is still maintained by the tech giant Facebook for internal use, and is still maintained by them. But if you first saw it back then it’s almost unrecognizable today. They have continued to update it with substantial changes over the years, and more changes keep coming.
But the reason that people have been switching to React ever since its launch is because of how it works, and the new(ish) approach to web development that it brings to the table.
React is a frontend framework used to create SPAs or Single Page Applications. This comes with all the advantages of a frontend framework that allow much better websites to be built more easily than before.
But the short version is that they are blazing fast, and only rely on servers for data transferred during a user session, and doesn’t have to request each web page.
Why Is It So Special?
First of all React is not the only game in town. It is one of many frontend frameworks that can accomplish the goal of creating a great SPA. While there are many other frameworks, Angular, React, and Vue make up the big three that you should consider learning.
That Being Said, React Is Relatively Easy To Learn.
The React Development team has a saying.
“It’s Just Javascript”
And that in itself is a huge selling point. Yes, when you start to learn React there are some things that are React specific that you’ll have to pick up, but more often than not you’re just writing JavaScript. Meaning that any developer who works in JavaScript (pretty much any Web Dev) can pick it up with relative ease.
It’s Really Well Supported
React has one of the largest tech companies in the world backing it, Facebook. But it’s also an open source project, which is good because that means that the concerns that come with Facebook working on something are avoided.
So with Facebook backing world class developers that work on React full time, along with one of the largest open source communities surrounding (142K Github Stars so far) it there are plenty of talented and smart people working on this project, making it better at a remarkable pace.
Reusable Focus
When working in React something you’ll come across constantly is focusing on building reusable components. This is always good practice when building an application, but in React it is encouraged by design.
Making reusable components means that you don’t have to write the same code over and over again, and instead can just call a different file, pass in the appropriate props, and be on your way. It takes a little practice, but once you get it there’s no going back.
You Get Better At JavaScript
Like anything else, when you write a lot of code you tend to get better at writing that code. In the case of React this means that you will get better at writing not only React but vanilla JavaScript.
Contrast this with something like Angular, which is much more opinionated. When writing Angular you will get much better at Angular, but not as much in the JS department.
Since, in React, it’s all just JavaScript you end up writing a lot of JavaScript. Go figure.
Have I Convinced You Yet?
Good, so where do you go from here? Well there are a ton of resources out there for learning React, but unsurprisingly the most complete is the official React Documentation.