Skip to Main Content
Redux Quick Start Guide
book

Redux Quick Start Guide

by James Lee, Tao Wei, Suresh Kumar Mukhiya
February 2019
Intermediate to advanced content levelIntermediate to advanced
204 pages
4h 52m
English
Packt Publishing
Content preview from Redux Quick Start Guide

Defining Saga

We are going to use the same endpoint to list users and search users. Searching users is similar to listing users with search queries. To list users, follow these steps:

  1. Define Saga. The Saga file is placed inside app/containers/User/saga.js. Here, we have only included the Saga code to create a user. The rest of the Saga code can be found inside CH06/app/containers/User/saga.js. It contains Saga for searching the user, removing a user, updating a user, creating a user, and checking a user's details:
import request from 'utils/request';import qs from 'query-string';import { notification } from 'antd';import { call, put, takeLatest } from 'redux-saga/effects';import {  USER_CREATE_REQUEST} from './constants';import { onCreateSuccess, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Redux Made Easy with Rematch

Redux Made Easy with Rematch

Sergio Moreno
Learning Redux

Learning Redux

Daniel Bugl
The React Workshop

The React Workshop

Brandon Richey, Ryan Yu, Endre Vegh, Theofanis Despoudis, Anton Punith, Florian Sloot, Daniel Bugl, Brandan Jones, SudarshanReddy Kurri, David Parker, Cihan Yakar

Publisher Resources

ISBN: 9781789610086Supplemental Content