vijayxtreme / redux-ts-ex

Redux & TS Example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

React, Redux w/TS Sandbox

Project to understand using TS w/React, Redux at a glance.

Big takeaways

  • Redux (store of state)
    • Use actionCreators to define actions
    • ActionTypes (constants) used across project
    • Reducer works with ActionTypes to return typed output (e.g. shape of desired output (string, obj, etc))
  • Higher level - redux is a way to conform app to state changes
  • Always have an initialState
  • When designing state, think of the pieces that represent your 'machine', e.g. 'loading', 'success', 'error'
  • How does each action translate to machine state?

About

Redux & TS Example


Languages

Language:TypeScript 77.1%Language:HTML 22.9%