Redux Quick Start Guide : a Beginner's Guide to Managing App State with Redux.
This book will help you get started with the Redux set-up and the Redux ecosystem. You will learn how to integrate Redux with React and other front-end JavaScript frameworks efficiently and manage application states effectively.
Clasificación: | Libro Electrónico |
---|---|
Autor principal: | |
Otros Autores: | , |
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: Understanding Redux; The need for Redux; Functional programming; Assigning functions to variables; Adding functions to objects and arrays; Functions as arguments; Functions returned by functions; Higher-order functions; Pure functions; Compositions; Fundamental principles of Redux; Single source of truth; Read-only nature of the state; The reducer principle
- changes are made with pure functions; The Redux ecosystem; Elements of Redux; Actions; Action creators; Reducers
- Store getState(); dispatch(action); subscribe(listeners); replaceReducer(nextReducer); Redux life cycle; Getting started; Understanding Redux methods; Setting up the project; Configuring the store; Configuring the root reducer; Configuring our app with Redux; Creating utilities; Creating the first container; Summary; Further study; Chapter 2: Testing; Setting up Jest; Testing ES6 functions; Testing a function; A general testing scenario; Time mocks; Testing React components; React components and mocking components; Multiple React components; Testing event handlers; Testing Redux
- Testing action creatorsTesting reducers; Higher-order functions; Summary; Further reading; Chapter 3: Routing; Using react-router-dom; Understanding route props; The Redirect component; Using connected-react-router; History; Mocking react-router-dom for testing; Summary; Further reading; Chapter 4: The Concept of Immutability; The need for immutability; The data reference problem; Reference handling; Getting started with Immutable JS; Components of Immutable JS; FromJS; Map; List; Set; The TODO app; Components; Reducers; Connecting with Redux; Using Immutable JS in our project
- The Immutable JS ecosystemFrequently asked questions; Summary; Further reading; Chapter 5: React with Redux; Components of React; Principles of React; New in React 16.8; New features with React 16.8; User interfaces; Project structure; React component libraries; Antd; styled-component; Redux form; containers/App/index.js; Login page; Register page; Users pages; Listing all of the users; Adding a new user page; Connecting with Redux; Action types; Connecting with Redux; Connecting the login page with Redux; Action creators; Constant; Connect; Connecting an add user page to Redux
- Login page reducerUnderstanding selectors; Why selectors?; reselect; Summary; Further study; Chapter 6: Extending Redux with Middleware; Exploring middleware; Router middleware; redux-saga middleware; Getting started; Adding Saga to the application; Connecting the Saga middleware to the store; Using the REST API; Prerequisites; Seeding users; Seeding doctors; Seeding admin; Connecting the login functionality with the API; Creating Saga; Passing the subset of the state to a component; Connecting the home page with the API; CRUD on users; Defining Saga; Language middleware; Summary