question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Kepler.gl doesn't work with Redux4 used in the wrapper application

See original GitHub issue

Describe the bug Kepler.gl is not working when wrapper application uses react-redux6. To Reproduce I created a branch with a new example here

Expected behavior Kepler.gl should load correctly

Debug trace

Uncaught Error: Could not find "store" in either the context or props of "Connect(Container)". Either wrap the root component in a <Provider>, or explicitly pass "store" as a prop to "Connect(Container)".
    at invariant (browser.js:38)
    at new Connect (connect.js:132)
    at constructClassInstance (react-dom.development.js:12628)
    at updateClassComponent (react-dom.development.js:14480)
    at beginWork (react-dom.development.js:15335)
    at performUnitOfWork (react-dom.development.js:18150)
    at workLoop (react-dom.development.js:18190)
    at HTMLUnknownElement.callCallback (react-dom.development.js:149)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:199)
    at invokeGuardedCallback (react-dom.development.js:256)

Additional context React 15

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:18 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
macrigiuseppecommented, Feb 12, 2019

Thanks for working on this @macrigiuseppe, I found this problem and downgraded react-redux to version 5.1.1, but unfortunately with this version it is not possible to use connected-react-router. So after upgrading back to react-redux 6.0.0, I’ve found this solution that also works for me:

      <ReactReduxContext.Consumer>
        {({ store }) => (
          <div className="App">
              <KeplerGl
                id="foo"
                mapboxApiAccessToken={MAPBOX_TOKEN}
                store={store}
              />
          </div>
        )}
      </ReactReduxContext.Consumer>

Have you tried react-redux 5.0.7, it works for me

2reactions
carloscdiascommented, Feb 11, 2019

Thanks for working on this @macrigiuseppe, I found this problem and downgraded react-redux to version 5.1.1, but unfortunately with this version it is not possible to use connected-react-router. So after upgrading back to react-redux 6.0.0, I’ve found this solution that also works for me:

      <ReactReduxContext.Consumer>
        {({ store }) => (
          <div className="App">
              <KeplerGl
                id="foo"
                mapboxApiAccessToken={MAPBOX_TOKEN}
                store={store}
              />
          </div>
        )}
      </ReactReduxContext.Consumer>
Read more comments on GitHub >

github_iconTop Results From Across the Web

Kepler.gl doesn't work with Redux4 used in the wrapper ...
It turns out the real issue here is that Kepler is using it's own instance of redux, so it doesn't have access to...
Read more >
All actions - kepler.gl
Currently kepler.gl doesn't allow calling receiveMapConfig after data is loaded. It will reset current configuration first then apply config to it.
Read more >
Introducing Kepler.gl, an Open-Source Geospatial Toolbox
We wrap around connect(), so the user doesn't have to worry about it. They can mount as many kepler.gl instances as they want...
Read more >
Integrating with Kepler.gl for visual based spatial analytics
Kepler.gl is a React application that uses Redux for state management. This post will assume a basic working knowledge of both, but if...
Read more >
kepler.gl - Yarn - Package Manager
owner keplergl20.8kMIT2.5.5TS vulns 15 vulnerabilities. kepler.gl is a webgl based application to visualize large scale location data in the browser.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found