What is React?
React was developed in 2011 by Jordan Walke, a software engineer at Facebook, and then released to the public in 2013. It has since become one of the most popular libraries for development of Single Page Applications.
React is licensed under the MIT License (which means it’s free to use, build on and share), and is used by many major platforms and websites today, such as Netflix, Facebook, Whatsapp Web, Instagram, PayPal, Dropbox and Khan Academy.
What are Single Page Applications?
On a normal website, users are constantly requesting new data from the server with nearly every click. Every time you search, write an email, publish a blog post, or book a flight — which each click subsequent click you are requesting data. Understandably, this can affect the user experience, with wait times after each action. Single Page Applications (SPAs) solve this problem.
A single-page application is an app that works inside a browser and does not require page reloading during use. You use SPAs every day: Dropbox, Gmail, Facebook, YouTube, Github, and Amazon are all SPAs. SPAs improve the user experience greatly by imitating a “natural” environment in the browser : no page reloads, no extra wait times.
Pros and Cons of SPAs
Single Page Applications greatly improve the user experience by reducing load and wait times as previously mentioned. They’re fast, since most resources (HTML and CSS) are loaded only once. They’re easy to debug, and development is simplified and streamlined.
However, SPAs also have some disadvantages:
Making SPAs SEO-friendly can require quite a bit of work (although it’s easier now than it used to be a few years ago), since the content of the page is fetched through AJAX (this is when data loads on a page and you don’t have to refresh the page — think about how GMAIL, Netflix or infinite scroll works). SPA websites can sometimes be slow to download as well – at least initially, since the user needs to fetch the entire framework (such as React).
|Single Page Applications|
Understandably, there’s a lot of market demand for React developers. As of June 2018, React was mentioned in over 28% of job postings across the most popular languages. Not only does React win on the jobs marketplace, it’s also leading in the number of npm downloads.
React Native Basics
Another great advantage that React has over competing frameworks is React Native.
React Native is an open-source mobile application framework created by Facebook. It is used to develop applications for Android, iOS and UWP by enabling developers to use React along with native platform capabilities.
React Native lets you with existing web technologies. React Native helps in building cross-platform mobile apps, which save time and costs as compared to creating completely separate apps for different platforms.
Today React Native is used by some of the most popular apps: Instagram, Facebook, Pinterest, Skype, Uber, Discord and others.
Checkout Facebook’s React Native tutorial to get started.
How do I get started with React?
There are tons of resources and learning materials on the web for React. Take a look at the Getting Started section of the official docs.
If you’re comfortable with the command line and npm you can install React with the command:
$ npm i react
var React = require(‘react’);
At One Month, we offer an online course in React which comes with certification. It’ll teach you the fundamentals, and get you started with your first React projects.