Map State to Props and Map Dispatch to Props

Abraham Diaz
Nov 10, 2021

--

Getting redux started was a bit of a challenge. Understanding it was the hardest part but once I started implementing into my project it made a lot more sense. One of the more confusing things was the differences between map state to props and map dispatch to props.

In my app map state to props is used to get the data from the store to display all the islands I have. It is used every time we need to access the store. Map Dispatch to props is used to update or alter the state. In my app I used it to fetch my islands from the backend to the store and also when a new island is created using my form. It can also be used to delete an island.

--

--

No responses yet