Tips to build a Todo app with react, redux-saga, typescript and react-bootstrap — 2

  1. data update only action. For example, loadToDosError and loadToDosSuccess.
  2. command only action. For example, saveToDos.
Soldier folllows the order
soldier is wait for the order
Commander orders moveToVillage
clean saga
Test save
import * as redux from 'react-redux'

const spy = jest.spyOn(redux, 'useSelector')
spy.mockReturnValue({ username:'test' })
jest.mock('react-redux', () => ({
useSelector: jest.fn(),
useDispatch: () => mockDispatch




Senior Software Engineer — Microsoft

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

All you need to know about var, let & const in JavaScript

How to deploy a repository with private submodules on Heroku

Smoke-test your app with CircleCI and NodeJS (catching bugs quickly)

Launching Crayons — Our New Web Component Library

IDisposable pattern in c sharp customer service number9692490283

WTF is currying?

Best React JS Courses Online[2020]

React Js Isometric

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Canhua Li

Canhua Li

Senior Software Engineer — Microsoft

More from Medium

How to Add Your Likes to a Favorites Page

A light intro to instrumentation on the web frontend

How to import assets in ReactJS and understand public folder ? | React App

React Application Development

Module 2 — React