Redux + Typescript: The type of the root state
You can get the type of the state from the root reducer // the reducer const appReducer = combineReducers({ global: globalStateReducer, example: exampleReducer }); type AppState = ReturnType<typeof appReducer> However the redux state can be cleared in some scenarios, so it should be undefinable //See https://stackoverflow.com/a/35641992/301447 for “undefined redux state” type RootState = AppState | …