万本电子书0元读

万本电子书0元读

顶部广告

Redux Quick Start Guide电子书

售       价:¥

2人正在读 | 0人评论 9.8

作       者:James Lee

出  版  社:Packt Publishing

出版时间:2019-02-28

字       数:20.8万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Integrate Redux with React and other front-end JavaScript frameworks efficiently and manage application states effectively Key Features * Get better at building web applications with state management using Redux * Learn the fundamentals of Redux to structure your app more efficiently * This guide will teach you develop complex apps that would be easier to maintain Book Description Starting with a detailed overview of Redux, we will follow the test-driven development (TDD) approach to develop single-page applications. We will set up JEST for testing and use JEST to test React, Redux, Redux-Sage, Reducers, and other components. We will then add important middleware and set up immutableJS in our application. We will use common data structures such as Map, List, Set, and OrderedList from the immutableJS framework. We will then add user interfaces using ReactJS, Redux-Form, and Ant Design. We will explore the use of react-router-dom and its functions. We will create a list of routes that we will need in order to create our application, and explore routing on the server site and create the required routes for our application. We will then debug our application and integrate Redux Dev tools. We will then set up our API server and create the API required for our application. We will dive into a modern approach to structuring our server site components in terms of Model, Controller, Helper functions, and utilities functions. We will explore the use of NodeJS with Express to build the REST API components. Finally, we will venture into the possibilities of extending the application for further research, including deployment and optimization. What you will learn * Follow the test-driven development (TDD) approach to develop a single-page application * Add important middleware, such as Redux store middleware, redux-saga middleware, and language middleware, to your application * Understand how to use immutableJS in your application * Build interactive components using ReactJS * Configure react-router-redux and explore the differences between react-router-dom and react-router-redux * Use Redux Dev tools to debug your application * Set up our API server and create the API required for our application Who this book is for This book is meant for JavaScript developers interesting in learning state management and building easy to maintain web applications.
目录展开

Title Page

Copyright and Credits

Redux Quick Start Guide

Dedication

About Packt

Why subscribe?

Packt.com

Contributors

About the authors

About the reviewers

Packt is searching for authors like you

Preface

Who this book is for

What this book covers

To get the most out of this book

Download the example code files

Conventions used

Get in touch

Reviews

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

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 creators

Testing reducers

Higher-order functions

Summary

Further reading

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

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 ecosystem

Frequently asked questions

Summary

Further reading

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 reducer

Understanding selectors

Why selectors?

reselect

Summary

Further study

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

Further study

Debugging Redux

Integrating Redux DevTools

Installing Redux DevTools

Redux DevTools extension

Understanding Redux DevToolsHMR

Replacing the hot module

Loading the hot module

Summary

Further reading

Understanding the REST API

The REST principle

The HTTP verbs and HTTP response status code

Project structure

Seeding users

User endpoints

POST – Creating a user

GET – List of users

Authentication and authorization

Authentication

Authorization

Getting a single user information

Updating user information

Other endpoints

Summary

Further reading

Other Books You May Enjoy

Leave a review - let other readers know what you think

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部