@reduxjs/toolkit#combineReducers TypeScript Examples

The following examples show how to use @reduxjs/toolkit#combineReducers. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: store.ts    From webminidisc with GNU General Public License v2.0 7 votes vote down vote up
reducer = combineReducers({
    renameDialog,
    uploadDialog,
    errorDialog,
    panicDialog,
    convertDialog,
    dumpDialog,
    recordDialog,
    appState,
    main,
})
Example #2
Source File: rootSaga.ts    From celo-web-wallet with MIT License 6 votes vote down vote up
monitoredSagaReducers: MonitoredSagaReducer = combineReducers(
  Object.keys(monitoredSagas).reduce(
    (acc: { [name: string]: Reducer<SagaState> }, sagaName: string) => {
      acc[sagaName] = monitoredSagas[sagaName].reducer
      return acc
    },
    {}
  )
)
Example #3
Source File: store.ts    From console with GNU Affero General Public License v3.0 6 votes vote down vote up
rootReducer = combineReducers({
  system: systemReducer,
  trace: traceReducer,
  logs: logReducer,
  watch: watchReducer,
  console: consoleReducer,
  buckets: bucketsReducer,
  bucketDetails: bucketDetailsReducer,
  objectBrowser: objectBrowserReducer,
  healthInfo: healthInfoReducer,
  dashboard: dashboardReducer,
  // Operator Reducers
  tenants: tenantsReducer,
  createTenant: createTenantReducer,
  addPool: addPoolReducer,
  editPool: editPoolReducer,
})
Example #4
Source File: reducerInjectors.test.ts    From datart with Apache License 2.0 6 votes vote down vote up
function configureStore() {
  const createReducer = (injectedReducers = {}) =>
    combineReducers({
      ...injectedReducers,
      nonInjected: (s = {}) => s,
    });

  const enhancers = [injectReducerEnhancer(createReducer)];

  const store = createStore(createReducer(), {}, compose(...enhancers));

  return store;
}
Example #5
Source File: store.ts    From prompts-ai with MIT License 6 votes vote down vote up
reducers = combineReducers(
    {
      editor: undoable(editorReducer, {
          limit: 10,
          filter: (action: Action) => {
              return filteredActions.includes(action.type);
          },
          groupBy: (action) => filteredActions.includes(action.type) ? `${action.type}_${Math.floor(Date.now() / 1000 / 10)}` : null,
      })
    }
)
Example #6
Source File: store.ts    From asynqmon with MIT License 6 votes vote down vote up
rootReducer = combineReducers({
  settings: settingsReducer,
  queues: queuesReducer,
  tasks: tasksReducer,
  groups: groupsReducer,
  servers: serversReducer,
  schedulerEntries: schedulerEntriesReducer,
  snackbar: snackbarReducer,
  queueStats: queueStatsReducer,
  redis: redisInfoReducer,
  metrics: metricsReducer,
})
Example #7
Source File: root.ts    From nyxo-app with GNU General Public License v3.0 6 votes vote down vote up
rootReducer = combineReducers({
  theme: themeReducer,
  onboarding: onboardingReducer,
  linking: linkingReducer,
  manualSleep: manualSleepReducer,
  calendar: calendarReducer,
  subscription: subscriptionReducer,
  modal: modalReducer,
  auth: authReducer,
  source: sourceReducer,
  nights: nightsReducer,
  sleep: sleepReducer,
  fitbit: fitbitReducer,
  oura: ouraReducer,
  withings: withingsReducer,
  healthKit: healthKitReducer,
  polar: polarReducer
})
Example #8
Source File: reducers.ts    From datart with Apache License 2.0 6 votes vote down vote up
/**
 * Merges the main reducer with the router state and dynamically injected reducers
 */
export function createReducer(injectedReducers: InjectedReducersType = {}) {
  // Initially we don't have any injectedReducers, so returning identity function to avoid the error
  if (Object.keys(injectedReducers).length === 0) {
    return state => state;
  }
  return combineReducers({
    ...injectedReducers,
  });
}
Example #9
Source File: rootReducer.ts    From dunno with MIT License 6 votes vote down vote up
rootReducer = combineReducers({
  list: listReducer,
  title: titleReducer,
  randomizer: randomizerReducer,
  person: personReducer,
  user: userReducer,
  myList: myListReducer,
  search: searchReducer,
})
Example #10
Source File: reducers.ts    From oasis-wallet-web with Apache License 2.0 6 votes vote down vote up
export function createReducer() {
  const rootReducer = combineReducers({
    account: accountReducer,
    createWallet: createWalletReducer,
    fatalError: fatalErrorReducer,
    ledger: ledgerReducer,
    network: networkReducer,
    openWallet: openWalletReducer,
    staking: stakingReducer,
    theme: themeReducer,
    transaction: transactionReducer,
    wallet: walletReducer,
  })

  return rootReducer
}
Example #11
Source File: helpers.ts    From grafana-chinese with Apache License 2.0 6 votes vote down vote up
getTemplatingAndLocationRootReducer = () =>
  combineReducers({
    templating: combineReducers({
      optionsPicker: optionsPickerReducer,
      editor: variableEditorReducer,
      variables: variablesReducer,
    }),
    location: locationReducer,
  })
Example #12
Source File: rootReducer.ts    From celo-web-wallet with MIT License 6 votes vote down vote up
rootReducer = combineReducers({
  wallet: persistedWalletReducer,
  balances: persistedBalancesReducer,
  contacts: persistedContactsReducer,
  feed: feedReducer,
  exchange: exchangeReducer,
  lock: lockReducer,
  fees: feeReducer,
  tokens: persistedTokensReducer,
  tokenPrice: persistedTokenPriceReducer,
  validators: persistedValidatorsReducer,
  governance: governanceReducer,
  nft: persistedNftReducer,
  settings: persistedSettingsReducer,
  walletConnect: walletConnectReducer,
  txFlow: txFlowReducer,
  saga: monitoredSagaReducers,
})
Example #13
Source File: index.ts    From moodtracker with MIT License 6 votes vote down vote up
store = configureStore({
  reducer: combineReducers({
    app: appSlice.reducer,
    device: deviceSlice.reducer,
    events: eventsSlice.reducer,
    settings: settingsSlice.reducer,
    user: userSlice.reducer,
  }),
})
Example #14
Source File: reducers.ts    From easy-email with MIT License 6 votes vote down vote up
rootReducer = combineReducers({
  user: user.reducer,
  template: template.reducer,
  templateList: templateList.reducer,
  extraBlocks: extraBlocks.reducer,
  toast: toast.reducer,
  email: email.reducer,
  loading: loading.reducer,
})
Example #15
Source File: index.ts    From rabet-extension with GNU General Public License v3.0 6 votes vote down vote up
rootReducer = combineReducers({
  bids,
  user,
  host,
  modal,
  options,
  interval,
  contacts,
  accounts,
  currencies,
  transaction,
  assetImages,
})
Example #16
Source File: store.ts    From prism-frontend with MIT License 6 votes vote down vote up
reducer = combineReducers({
  mapState: mapStateReduce,
  serverState: serverStateReduce,
  tableState: tableStateReduce,
  tooltipState: tooltipStateReduce,
  analysisResultState: analysisResultStateReduce,
  notificationState: notificationStateReduce,
  mapSelectionLayerStateSlice: mapSelectionLayerStateReduce,
  datasetState: datasetResultStateReduce,
})
Example #17
Source File: index.ts    From Account-Manager with MIT License 6 votes vote down vote up
bankReducers = combineReducers({
  [ACCOUNTS]: bankAccountsReducer,
  [BANK_TRANSACTIONS]: bankBankTransactionsReducer,
  [BANKS]: bankBanksReducer,
  [BLOCKS]: bankBlocksReducer,
  [CONFIGS]: bankConfigsReducer,
  [CONFIRMATION_BLOCKS]: bankConfirmationBlocksReducer,
  [INVALID_BLOCKS]: bankInvalidBlocksReducer,
  [VALIDATOR_CONFIRMATION_SERVICES]: bankValidatorConfirmationServicesReducer,
  [VALIDATORS]: bankValidatorsReducer,
})
Example #18
Source File: reducers.ts    From react-boilerplate-cra-template with MIT License 6 votes vote down vote up
/**
 * Merges the main reducer with the router state and dynamically injected reducers
 */
export function createReducer(injectedReducers: InjectedReducersType = {}) {
  // Initially we don't have any injectedReducers, so returning identity function to avoid the error
  if (Object.keys(injectedReducers).length === 0) {
    return state => state;
  } else {
    return combineReducers({
      ...injectedReducers,
    });
  }
}
Example #19
Source File: store.ts    From knboard with MIT License 6 votes vote down vote up
rootReducer = combineReducers({
  auth: authReducer,
  profile: profileReducer,
  toast: toastReducer,
  board: boardReducer,
  column: columnReducer,
  task: taskReducer,
  comment: commentReducer,
  member: memberReducer,
  label: labelReducer,
  responsive: responsiveReducer,
})
Example #20
Source File: store.ts    From pali-wallet with MIT License 5 votes vote down vote up
reducers = combineReducers({
  price,
  vault,
})
Example #21
Source File: index.ts    From datart with Apache License 2.0 5 votes vote down vote up
editBoardReducer = combineReducers({
  stack: editBoardStackReducer,
  boardInfo: editDashBoardInfoSlice.reducer,
  widgetInfoRecord: widgetInfoRecordSlice.reducer,
  widgetDataMap: editWidgetDataSlice.reducer,
})
Example #22
Source File: store.ts    From react-pokedex with MIT License 5 votes vote down vote up
rootReducer = combineReducers({
  cachedPokemons: cachedPokemonsReducer,
  pokemons: pokemonsReducer,
  species: speciesReducer,
  evolutionChain: evolutionChainReducer,
})
Example #23
Source File: index.ts    From waifusion-site with MIT License 5 votes vote down vote up
reducers = combineReducers({
  user: userReducer,
  waifus: waifusReducer,
  globals: globalsReducer,
})
Example #24
Source File: helpers.ts    From grafana-chinese with Apache License 2.0 5 votes vote down vote up
getTemplatingRootReducer = () =>
  combineReducers({
    templating: combineReducers({
      optionsPicker: optionsPickerReducer,
      editor: variableEditorReducer,
      variables: variablesReducer,
    }),
  })
Example #25
Source File: index.ts    From Account-Manager with MIT License 5 votes vote down vote up
appReducers = combineReducers({
  managedAccounts: managedAccountsReducer,
  managedBanks: managedBanksReducer,
  managedFriends: managedFriendsReducer,
  managedValidators: managedValidatorsReducer,
})
Example #26
Source File: index.ts    From Account-Manager with MIT License 5 votes vote down vote up
socketReducers = combineReducers({
  clean: cleanSocketsReducer,
  crawl: crawlSocketsReducer,
})
Example #27
Source File: index.ts    From Account-Manager with MIT License 5 votes vote down vote up
validatorReducers = combineReducers({
  [ACCOUNTS]: validatorAccountsReducer,
  [BANKS]: validatorBanksReducer,
  [CONFIGS]: validatorConfigsReducer,
  [VALIDATORS]: validatorValidatorsReducer,
})
Example #28
Source File: rootReducer.ts    From overwolf-modern-react-boilerplate with MIT License 5 votes vote down vote up
rootReducer = combineReducers({
  background: backgroundReducer,
})
Example #29
Source File: store.ts    From cra-template-typekit with MIT License 5 votes vote down vote up
rootReducer = combineReducers({
  counter: counterReducer,
})