mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-15 23:54:42 -04:00
Create store using redux-toolkit
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
3b102b75f5
commit
ea42b9092e
3 changed files with 52 additions and 4 deletions
|
@ -4,11 +4,14 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { createStore } from 'redux'
|
||||
import { composeWithDevTools } from 'redux-devtools-extension/developmentOnly'
|
||||
import { allReducers } from './reducers'
|
||||
import type { ApplicationState } from './application-state'
|
||||
import { configureStore } from '@reduxjs/toolkit'
|
||||
import { isDevMode } from '../utils/test-modes'
|
||||
|
||||
export const store = createStore(allReducers, composeWithDevTools())
|
||||
export const store = configureStore({
|
||||
reducer: allReducers,
|
||||
devTools: isDevMode
|
||||
})
|
||||
|
||||
export const getGlobalState = (): ApplicationState => store.getState()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue