Dispatch and Modifying State

What's the first argument passed to createStore?
Nothing
Your reducer
Dispatch
The store's state
How do you update the state of your store?
Dispatch an action
Invoke store.setState
Action a dispatch
Invoke your reducer
Internally, "createStore" gets the new state of the store by invoking "reducer", passing it the current state and the action which was dispatched.
True
False
Which is the correct implementation of dispatch?
const dispatch = (action) => {state = reducer(state, action)}
const dispatch = (action) => {
  setState(state, action)
  listeners.forEach((listener) => listener())
}
const dispatch = (action) => {
  state = reducer(state, action)
  listeners.forEach((listener) => listener())
}
const dispatch = () => {
  state = reducer(state, action)
  listeners.forEach((listener) => listener())
}
{"name":"Dispatch and Modifying State", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"What's the first argument passed to createStore?, How do you update the state of your store?, Internally, \"createStore\" gets the new state of the store by invoking \"reducer\", passing it the current state and the action which was dispatched.","img":"https://www.quiz-maker.com/3012/images/ogquiz.png"}
Powered by: Quiz Maker