keplergl / kepler.gl

Kepler.gl is a powerful open source geospatial analysis tool for large-scale data sets.
http://kepler.gl
MIT License
10.36k stars 1.74k forks source link

Consider removing default redux context dependency #1171

Open chrisirhc opened 4 years ago

chrisirhc commented 4 years ago

Is your feature request related to a problem? Please describe. Looks like kepler.gl depends on a particular version of redux / react-redux and that a default react-redux context be set up. I'm hoping this dependency can be removed as more users move onto using Hooks etc. (e.g. #1005, #1170). This is also an incremental and hopefully non-disruptive change towards enabling removal of react-redux as a dependency in the future (since useReducer should suffice).

Describe the solution you'd like You should be able to avoid a lot of the action forwarding and custom wiring of redux via the custom context approach outlined in: https://react-redux.js.org/using-react-redux/accessing-store#providing-custom-context

Describe alternatives you've considered Potentially a simple useReducer hook that kepler.gl uses could be another alternative.

I'm not sure what the implications are with react-palm but I'm guessing it's only using react-palm for the factory/dependency-injection. I could be wrong.

ericsoco commented 4 years ago

Related: https://github.com/keplergl/kepler.gl/issues/1170