Learning React fundamentals
React is a declarative library used to build interactive and dynamic UIs, including isolated small components. It is also sometimes referred to as a framework because it is as capable as and comparable with other JavaScript frameworks such as AngularJS. However, React is a library and works with other supported libraries, including React Router, React Redux, and so on. You normally use it to develop SPAs, but it can also be used to develop full stack applications.
React is used to build the view layer of the application per the MVC architecture. You can build reusable UI components with their own state. You can use either plain JavaScript with HTML or JavaScript Syntax Extension (JSX) for templating. We’ll be using JSX in this chapter, which employs a virtual Document Object Model (VDOM) for dynamic changes and interactions.
Let’s create a new React app using the create-react-app
utility next. This utility scaffolds and provides the basic...