Carl Rippon

Building SPAs

Carl Rippon
BlogBooks / CoursesAbout
This site uses cookies. Click here to find out more

4 reasons to use React.js

September 24, 2015
reactjavascript

I’ve been getting into React.js recently. It’s a JavaScript library for building front-end views. The goals of React.js are to be simple, declarative and composable. Here’s what attracted me …

1. Fast

React.js utilises a virtual DOM. So, when the UI changes, React.js compares the old state to the new state in memory and updates the DOM in the least expensive way. This way, React.js avoids costly DOM operations and makes updates in a very efficient manner.

2. Composable

React.js gives you the ability to create your own components that you can later reuse and combine. The ability to encapsulate UI pieces is a great productivity boost.

A syntax called JSX is used to create components which mixes HTML and JavaScript which at first sounds bad but I’ve actually found beneficial. Since there is no strongly typed interface between HTML and JavaScript I think it makes component more maintainable by having the HTML and JavaScript together.

3. Isomorphic friendly

React can support rendering on the server as well as the client. This makes it SEO friendly if you are building a public facing web site.

Another advantage of server side rendering is a faster start up time for single page apps. The start up time for a SPA tends to be slow because lots of resources need to be downloaded before the first screen renders. Rendering the first screen on the server allows the user to see some useful content whilst all the resources are being downloaded.

4. Battle proven

React.js was created by a collaboration between Facebook and Instagram and was released in 2013. As well as these 2 companies using it, it is also used by many other big companies like Adobe, PayPal and Dropbox. So, React.js has had a lot of heavy use.

If you to learn about using TypeScript with React, you may find my course useful:

Using TypeScript with React

Using TypeScript with React
Find out more

Want more content like this?

Subscribe to receive notifications on new blog posts and courses

Required
© Carl Rippon
Privacy Policy