How to use the @reduxjs/toolkit.combineReducers function in @reduxjs/toolkit

To help you get started, we’ve selected a few @reduxjs/toolkit examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bunkerchat / bunker / src / rootReducer.js View on Github external
import { combineReducers } from "@reduxjs/toolkit";
import localUser from "./features/users/localUserReducer";
import localRoomMembers from "./features/users/localRoomMembersSlice";
import userSettings from "./features/settings/userSettingsReducer";
import users from "./features/users/usersReducer";
import rooms from "./features/room/roomsSlice";
import messages from "./features/message/messagesReducer";
import chatInput from "./features/input/chatInputReducer";
import emoticonPicker from "./features/emoticon/emoticonPickerReducer";
import messageControls from "./features/messageControls/messageControlsSlice";
import imagePick from "./features/imagePick/imagePickReducer";
// import log from "./features/chat/logReducer";
import socket from "./features/socket/socketSlice";
import version from "./features/version/versionSlice";

const rootReducer = combineReducers({
	localUser,
	localRoomMembers,
	userSettings,
	users,
	rooms,
	messages,
	chatInput,
	emoticonPicker,
	messageControls,
	imagePick,
	// log,
	socket,
	version
});

export default rootReducer;
github reduxjs / rtk-github-issues-example / src / app / rootReducer.ts View on Github external
import { combineReducers } from '@reduxjs/toolkit'

import issuesDisplayReducer from 'features/issuesDisplay/issuesDisplaySlice'
import repoDetailsReducer from 'features/repoSearch/repoDetailsSlice'
import issuesReducer from 'features/issuesList/issuesSlice'
import commentsReducer from 'features/issueDetails/commentsSlice'

const rootReducer = combineReducers({
  issuesDisplay: issuesDisplayReducer,
  repoDetails: repoDetailsReducer,
  issues: issuesReducer,
  comments: commentsReducer
})

export type RootState = ReturnType

export default rootReducer
github HospitalRun / hospitalrun-frontend / src / store / index.ts View on Github external
import { configureStore, combineReducers, Action } from '@reduxjs/toolkit'
import ReduxThunk, { ThunkAction } from 'redux-thunk'
import patient from '../patients/patient-slice'
import patients from '../patients/patients-slice'
import title from '../slices/title-slice'
import user from '../slices/user-slice'

const reducer = combineReducers({
  patient,
  patients,
  title,
  user,
})

const store = configureStore({
  reducer,
  middleware: [ReduxThunk],
})

export type AppDispatch = typeof store.dispatch
export type AppThunk = ThunkAction>
export type RootState = ReturnType

export default store
github mregni / EmbyStat / EmbyStat.Web / ClientApp / src / store / RootReducer.tsx View on Github external
import { combineReducers } from '@reduxjs/toolkit';
import settingsSlice from './SettingsSlice';
import languageSlice from './LanguageSlice';
import wizardSlice from './WizardSlice';
import jobSlice from './JobSlice';
import jobLogsSlice from './JobLogsSlice';
import movieSlice from './MovieSlice';
import serverStatusSlice from './ServerStatusSlice';

const rootReducer = combineReducers({
  settings: settingsSlice,
  languages: languageSlice,
  wizard: wizardSlice,
  jobs: jobSlice.reducer,
  jobLogs: jobLogsSlice.reducer,
  movies: movieSlice,
  serverStatus: serverStatusSlice.reducer
});

export type RootState = ReturnType;

export default rootReducer;