Book Image

Create React App 2 Quick Start Guide

By : Brandon Richey
Book Image

Create React App 2 Quick Start Guide

By: Brandon Richey

Overview of this book

If you're a power user and you aren’t happy always reusing default configurations, from previous applications with each new application, then all you need is Create React App (CRA), a tool in the React ecosystem designed to help you create boilerplate code for building a web frontend. This book will help you use CRA to write React programs without significant configuration-related difficulties. With this quick start guide, you will integrate your applications with React to build efficient professional web services.You will learn to design UIs with the features of CRA and template your React applications. By the end of the book, you will be sufficiently skilled to be able to build faster and effective React apps using CRA.
Table of Contents (10 chapters)

Babel and the latest JavaScript syntax

We've been building up this application to act as our base and in the process we've introduced a lot of syntax that may not be the same JavaScript that you're used to writing! For example, we've written a few functions with this sort of syntax:

const foo = () => {
doSomething();
doSomethingElse();
}

The syntax here is not particularly tricky and you can probably figure out what's going on, but maybe you don't fully understand how all of that ends up as a function when all is said and done. You may be more used to writing functions in a similar pattern to the following:

var foo = function() {
doSomething();
doSomethingElse();
}

Or maybe something more like a function declaration without the variable, such as the following function:

function foo() {
doSomething();
doSomethingElse();
}

The reality is that...