GriddleGriddle / Griddle

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

Basic example is causing a redux console error #737

Closed ckollars closed 6 years ago

ckollars commented 7 years ago

Griddle version

1.8.1

Expected Behavior

Show an example of Griddle based off quick start example

Actual Behavior

Shows an error in the console

TypeError: (0 , _reactRedux.createProvider) is not a function
    at new Griddle (:8081/0.bundle.js:77281)
    at :8081/0.bundle.js:43243
    at measureLifeCyclePerf (:8081/0.bundle.js:43023)
    at ReactCompositeComponentWrapper._constructComponentWithoutOwner (:8081/0.bundle.js:43242)
    at ReactCompositeComponentWrapper._constructComponent (:8081/0.bundle.js:43228)
    at ReactCompositeComponentWrapper.mountComponent (:8081/0.bundle.js:43136)
    at Object.mountComponent (:8081/0.bundle.js:4805)
    at ReactCompositeComponentWrapper.performInitialMount (:8081/0.bundle.js:43319)
    at ReactCompositeComponentWrapper.mountComponent (:8081/0.bundle.js:43206)
    at Object.mountComponent (:8081/0.bundle.js:4805)
console

Steps to reproduce

Create a component data.grid.js and include it in existing component to see if it can render with example content.

import React from 'react';
import Griddle from 'griddle-react';

class DataGrid extends React.PureComponent {

    render() {
        let data = [
            { one: 'one', two: 'two', three: 'three' },
            { one: 'uno', two: 'dos', three: 'tres' },
            { one: 'ichi', two: 'ni', three: 'san' }
        ];

        return <Griddle data={data} />;
    }

}

export default DataGrid;

Pull request with failing test or storybook story with issue

While this step is not necessary, a failing test(s) and/or a storybook story will help us resolve the issue much more easily. Please see the README for more information.

dahlbyk commented 7 years ago

This seems like an installation issue. What does npm ls show?

ckollars commented 7 years ago

Here is a snippet of the print out.

├─┬ griddle-react@1.8.1
│ ├── immutable@3.8.1
│ ├── lodash@4.17.4
│ ├── max-safe-integer@1.0.1
│ ├─┬ react-redux@5.0.6
│ │ └── hoist-non-react-statics@2.3.1
│ └─┬ recompose@0.21.2
│   └── change-emitter@0.1.6
ckollars commented 7 years ago

Digging into this more I found that the issue is that the app I'm working in uses the dependency "react-redux": "^5.0.2" and Griddle uses "react-redux": "^5.0.6" Once I updated my my app to the latest minor version it fixed the issue.

I seen this referenced in an issue on react-redux when documentation was updated. https://github.com/reactjs/react-redux/issues/738