Book Image

Building Scalable Apps with Redis and Node.js

By : Joshua Johanan
Book Image

Building Scalable Apps with Redis and Node.js

By: Joshua Johanan

Overview of this book

Table of Contents (17 chapters)
Building Scalable Apps with Redis and Node.js
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Introducing React


We only have one chapter on building the frontend. Because of this, we will spend some time on introducing the libraries we will use to build the frontend in this chapter. This will allow us to jump right into writing code.

First up is React (http://facebook.github.io/react/). React is a library that was built by Facebook and Instagram. The entirety of Instagram's interface and Facebook's comments are built using React. It is designed to only be used for user interfaces. It does not make any assumptions about how or where you get data. This makes it easy to interoperate with other libraries.

React uses a virtual Document Object Model (DOM). The DOM is all the elements that are on a page. A virtual DOM allows the library to only render the differences. Anytime a lot of elements render, the browser must take time to figure out what an insertion or deletion of an element will do to the page. Doing this takes time. React is able to keep rendering to a minimum, making it fast...