mapStateToProps

This is part of the wrap API. It is one of the keys you can supply to the configuration object. If you are unsure what this means, look at the wrap API docs.

mapStateToProps allows coflux to know what dependencies this component has from the application state. It allows coflux to handle shouldComponentUpdate behind the scenes. It also allows coflux to make sure everything stays colocated and declarative.

mapStateToProps must return an object. The object's keys define the name for accessing in props. The value of each key in the return object is a path. Read up on coflux path here.

results matching ""

    No results matching ""