Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

mapStateToProps in Redux

The is a Function which takes the state as an input parameter and maps the properties in the state to props mapStateToProps  in the component.

mapStateToProps take the state object (the same value returned by a call to store.getState()) as the first argument and return a plain object containing the data that the connected component needs.  This function should be passed as the first argument to connect, and will be called every time when the Redux store state changes.


This post first appeared on C# Guide, please read the originial post: here

Share the post

mapStateToProps in Redux

×

Subscribe to C# Guide

Get updates delivered right to your inbox!

Thank you for your subscription

×