Redux Store
The entire state of the application is stored in an object called Redux Store. We can create a Redux Store using the configureStore
function imported from @reduxjs/toolkit
:
js912import { configureStore } from '@reduxjs/toolkit';const store = configureStore({ reducer: counterReducer });
In the configureStore
function we pass an object containing at least one reducer. The store
is a reference to the create store. We can access the object containing the state data using the getState
method:
js912console.log(store.getState())// {countValue: 7}
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 2. Розділ 3
Запитати АІ
Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат