foo
, the wrapper reducer will add a kepler.gl local state in the root state at key foo
.foo
other with id bar
. Our keplerGl reducer is going to be keplerGl: {foo: …, bar …}
. When foo dispatches an action, it only needs to update the state of foo, we need a way to decorate the action that the root reducer only pass it down to subreducer foo
.wrapTo
, forwardTo
and unwrap
. wrapTo
wraps an action payload into an forward action by adding an address _addr_
and a _forward_
signature to its meta.UPDATE_MAP
is mapped to updateMapUpdater
. An updater is the backbone of the redux reducer. It is a pure function that takes the previous state and an action, and returns the next state. (oldState, action) => newState
. It describes how the state should transition upon receiving that action.processCsvData(csv)
and processGeojson(geojson)
to parse csv or geoJson file and pass it to addDataToMap()
action.KeplerGlSchema.save()
and pass it the instant state. It will return a json output containing map data and config. Pass this json file to processKeplerglJSON()
and then addDataToMap()
will reproduce the same map.