Cargando…

Create React App 2 Quick Start Guide : Build React Applications Faster with Create React App.

This book will help you use CRA to write React programs without much hassle of configuration. 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 applic...

Descripción completa

Detalles Bibliográficos
Clasificación:Libro Electrónico
Autor principal: Richey, Brandon
Formato: Electrónico eBook
Idioma:Inglés
Publicado: Birmingham : Packt Publishing Ltd, 2019.
Temas:
Acceso en línea:Texto completo
Tabla de Contenidos:
  • Cover; Title Page; Copyright and Credits; Dedication; About Packt; Contributors; Table of Contents; Preface; Chapter 1: Introducing Create React App 2; What is Create React App?; What is the history of Create React App?; The early days of JavaScript development; The bundle era; What problems does CRA solve?; Installing prerequisites for Create React App; Creating our first Create React App project; A quick look at the options of CRA; The yarn start command; The yarn build command; The yarn test command; The yarn eject command; Let's explore the created project; Adding code to our project
  • Creating our first componentWait, what is JSX?; Embedding style sheets in our component; Looking forward
  • what will we do?; The project plan; Summary; Chapter 2: Creating Our First Create React App Application; Creating our first major project; Designing our application; Building the baseline functionality for our application; Creating our project; Initializing our components to build on top off; Building separate components in separate files; Introducing props; Writing a class-based component; Bringing state into our component; Adding interactivity via state modifications
  • Indicating our state with CSSIterating our project further; Building a List component; Adding the TodoList to our App; Adding state to TodoList; Creating and using a helper render() function; Creating a new Todo component; Passing a function as a prop; Removing items is important too; Summary; Chapter 3: Create React App and Babel; Babel and the latest JavaScript syntax; What is Babel?; Understanding the history; Where does Babel fit into the puzzle?; Exploring modern JavaScript with Babel; JSX; Function syntax; Destructuring; Optional arguments; The spread operator; React Fragments
  • A quick recapSummary; Chapter 4: Keep Your App Healthy with Tests and Jest; The why and when of testing; The history of testing React; About Jest; Analyzing the structure of Jest tests; Exploring the test output; A development test workflow with the F key; It's time to add some new tests!; Writing a generic snapshot test; Writing tests for content; What's a shallow render?; Testing interactions; Completing our interactivity tests; Returning to our mocked function; Adding tests for TodoList; Adding tests for NewTodo; Summary; Chapter 5: Applying Modern CSS to Create React App Projects
  • What tools are available?CSS conflicts can ruin your application; A quick example of CSS conflicts; Introducing CSS Modules; Better project organization; How to use CSS Modules; Introducing CSS Modules to our application; Composability with CSS Modules; Introducing SASS to our project; What is SASS?; Installing and configuring SASS; Mixing SASS and CSS Modules; Adding CSS frameworks; Cleaning up our design, starting with the header; Cleaning up the NewTodo component; Cleaning up our Todo component; Making our tests pass again; Summary; Chapter 6: Simulate Your Backend with a Proxy API