Table of Contents


Some actions will affect the entire kepler.lg instance state. The updaters for these actions is exported as combinedUpdaters. These updater take the entire instance state as the first argument. Read more about Using updaters


import keplerGlReducer, {combinedUpdaters} from '';
// Root Reducer
const reducers = combineReducers({
keplerGl: keplerGlReducer,
app: appReducer
const composedReducer = (state, action) => {
switch (action.type) {
// add data to map after receiving data from remote sources
return {
keplerGl: {
// pass in instance state to combinedUpdaters
map: combinedUpdaters.addDataToMapUpdater(,
payload: {
datasets: action.datasets,
options: {readOnly: true},
config: action.config
return reducers(state, action);
export default composedReducer;


Combine data and full configuration update in a single action


  • state Object instance state, containing all subreducer state

  • action Object

    • action.payload Object {datasets, options, config}

      • action.payload.datasets (Array<Object> | Object) *required datasets can be a dataset or an array of datasets

        Each dataset object needs to have info and data property.

        • Object -info of a dataset

          • string id of this dataset. If config is defined, id should matches the dataId in config.

          • string A display name of this dataset

        • Object *required The data object, in a tabular format with 2 properties fields and rows

          • Array<Object> *required Array of fields,

            • string *required Name of the field,

          • Array<Array> *required Array of rows, in a tabular format with fields and rows

      • action.payload.options Object option object {centerMap: true}

      • action.payload.config Object map config

Returns Object nextState