Connect mapStateToProps

Connects a component to the redux store and generates mapStateToProps only.

How it works

  • Defines mapStateToProps below the component definition (if not present)
  • Wraps exported (returned, if it's a HOC) component with connect (if not present)
  • Uses mapStateToProps with aforementioned connect (replacing null values if present)
  • Adds connect import statement (if not present)

Examples

© 2018 - 2019 Kamil Mielnik & Yuriy Yakym. All rights reserved.