Chapter 1

Getting Started with React

IN THIS CHAPTER

Bullet Getting started with ReactJS

Bullet Creating your first ReactJS project

Bullet Rendering in the browser with ReactDOM

“It's not what happens to you, but how you react to it.”

—EPICTETUS

ReactJS was created in 2012 by Facebook for use on the Facebook.com newsfeed and on Instagram. It was released as open source in 2013 and quickly became one of the most popular JavaScript user interface libraries.

Understanding ReactJS

When ReactJS (also known as just React) was brand-new, it represented a new way of building and updating user interfaces. Behind the scenes, of course, React is using the DOM, which you can read about in Book 2, Chapter 2, to dynamically update HTML documents. But it was the way that the React library built a layer on top of the DOM that was revolutionary.

To web developers who are used to the old way of thinking about manipulating the DOM, making the switch to thinking about user interfaces in “the React way” presents a bit of a challenge. To help programmers understand how React thinks about user interfaces, React's creators wrote a brief article, “Thinking in React,” that still provides guiding principles for how the language ...

Get JavaScript All-in-One For Dummies now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.