Redux Flashcards
Store
This holds the whole state (all your data) for your app. It is an object with a few methods on it.
Actions
Payloads of information that send data from your application to your store. They are the only source of information for the store.
Reducers
Specify how the application’s state changes in response in response to an action
Provider
From react-redux. We wrap our app in this, and pass “store” to it as a prop.
Action Creators
Functions that return actions
Dispatching
Synchronously sending an action to the store’s reducer, along with the previous state returned by the store, to calculate a new state.
Thunk
Allows you to write action creators that return a function instead of an action. It can be used to delay the dispatch. Makes asynchronous stuff easier to work with.
getState()
Store method that returns the current state tree of your application.
dispatch(action)
Store method that dispatches an action. This is the only way to trigger a state change.
subscribe(listener)
Store method that adds a change listener. It will be called any time an action is dispatched, and some part of the state tree may potentially have changed.
combineReducers()
Store helps combine the difference pieces of React that we separated for organizational reasons.