Menu
My Site LogoMy Site LogoDanyal AsifDocsBlog
GitHub
🌜
🌞
My Site LogoMy Site LogoDanyal Asif
  • Docs
  • Blog
  • GitHub
  • Introduction
  • Certs And Trainings
  • Algorithms & Data Structures
    • Introduction
    • Bubble Sort
  • Containers
    • Basics
    • orchestration
      • Basics
  • CSS
    • Basics
    • SASS
  • DevOps
    • Introduction
    • AWS
    • DevSecOps
  • draft
  • Flutter
    • Flutter basics
    • Flutter
    • Flutter Input
    • Flutter Navigation
    • Flutter Widgets
  • funstuff
    • Advent of Code - 2019
  • Fun Stuff - Programming for fun
  • javascript
    • JavaScript Debugging
    • Filter Object of Objects
    • Introduction
    • Javascript The Hard Parts
    • JavaScript: The New Hard Parts
    • NPM
    • Object-Oriented Programming
    • referrences
    • Typescript Basics and Stuff
    • Filter arrays for unique objects
  • MobX
  • react
    • React Debugging
    • React
  • react-native
    • expo
      • Push Notifications
    • Expo
    • React Native
    • React Navigation (V4)
  • redux
    • Basics
    • Redux Toolkit
    • Redux Saga
    • Thunk
  • VueJs
    • Introduction
    • Vue Methods
  • websockets
    • SignalR
    • WebRTC
  • YAML

Basics

Redux#

Reducer#

Reducer is a function and it takes two arguments (action, currentState) -Process-> Returns new state

Action creators creates an object, sends it to reducer, out comes a new state

Redux compose#

Takes a bunch of functions and returns a new function

const lotsOfFuncs = compose(makeLouder, embolden, Yolo) It's a way of chaining functions

Redux createStore#

combineReducers#

React only has concept of one reducer. We can split up reducers then use combineReducers to combine them into one file.

applyMiddleware#

stub

Referrences#

useDispatch

Edit this page
Previous
« React Navigation (V4)
Next
Redux Toolkit »
  • Reducer
  • Redux compose
  • Redux createStore
  • combineReducers
  • applyMiddleware

Docs

  • Self Documentation

Community

  • Stack Overflow
  • Discord
  • Twitter

More

  • Blog
  • GitHub
Copyright © 2021 My Project, Inc. Built with Docusaurus.