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)

Introducing CSS Modules

The first of these are CSS Modules, and in Create React App 2 and higher, you don't need to do anything at all to start taking advantage of it immediately. CSS Modules give you the ability to modularize any CSS code that you import in a way that prevents introducing global, overlapping namespaces, despite the fact that the end result is still just one giant CSS file.

That being said, it's also not just going to immediately work in your project if you don't turn anything on or organize your code a little bit better. Right now, we've been placing all of our code directly into the src/ directory, resulting in a scenario where the root folder is going to keep growing and growing over time until it gets so large and unwieldy that you'll never be able to find anything.

...