GriddleGriddle / Griddle

Simple Grid Component written in React
http://griddlegriddle.github.io/Griddle/
MIT License
2.5k stars 378 forks source link

Export connect #751

Closed dahlbyk closed 7 years ago

dahlbyk commented 7 years ago

Griddle major version

1.8+

Changes proposed in this pull request

  1. Export connect directly, so it's more of a drop-in replacement for react-redux, i.e.

    -import { connect } from 'react-redux';
    +import { connect } from 'griddle-react';
  2. Add static storeKey property, so default can be changed once app-wide

  3. The storeKey story's ConnectedComponent was incorrectly using Griddle's connect; now it doesn't, and the demo works. (Bonus: demo's slightly prettier.) image

Why these changes are made

I'm actually using this functionality now across an app, and it's a bit tedious.

ryanlanciaux commented 7 years ago

Thanks for adding this! Yea this is way nicer than needing to go several levels down to get griddle's connect 👍