Possible Gotcha
This lesson teaches us about some of the rules and conventions of working with Redux. Instead of directly accessing the state, we use the store to receive the state as props.
We'll cover the following...
We'll cover the following...
In the just concluded Hello World example, a possible solution you may have come up with for grabbing the state from the STORE may look like this:
What do you think? Will this work? Just as a reminder, the following two ways are correct ways to initialise a React component’s state.
(a)
(b)
So, back to answering the question, yes, the solution will work just fine.
store.getState() ...