Skip to content

Pass store to Grid #224

Description

@kombucha-java

Could you please explain how to pass store to Grid? If i try to not define prop 'store' i get the error -
Uncaught TypeError: Cannot read property 'dispatch' of undefined at Grid.setColumns (app.js:180670) at Grid.componentWillMount (app.js:180392) at callComponentWillMount (app.js:170651) at mountClassInstance (app.js:170744) at updateClassComponent (app.js:172444) at beginWork (app.js:173298) at performUnitOfWork (app.js:176113) at workLoop (app.js:176153) at renderRoot (app.js:176239) at performWorkOnRoot (app.js:177128)

The reason is this.context.store is undefined. If i try to define Grid prop 'store' manually the error is -
Uncaught Error: Passing redux store in props has been removed and does not do anything. To use a custom Redux store for specific components, create a custom React context with React.createContext(), and pass the context object to React-Redux's Provider and specific components like: <Provider context={MyContext}><ConnectedComponent context={MyContext} /></Provider>. You may also pass a {context : MyContext} option to connect

I tried to create custom context and pass it to redux's Provider and down to the Grid, but the result was the same - this.context.store was undefined. What am I doing wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions