сам STORE
import { configureStore } from '@reduxjs/toolkit';
import booksReducer from './slice/booksSlice';
import filterReducer from './slice/filterSlice';
import errorReducer from './slice/errorSlice';
const store = configureStore({
reducer: {
books: booksReducer,
filter: filterReducer,
error: errorReducer,
},
});
export default store;
сам ERRORSLICE
import { createSlice } from '@reduxjs/toolkit';
const initialState = '';
const errorSlice = createSlice({
name: 'books',
initialState,
reducers: {
setError: (state, action) => {
return action.payload;
},
clearError: () => {
return initialState;
},
},
});
//
export const { setError, clearError } = errorSlice.actions;
export const selectedErrorMessage = (state) => state.error;
export default errorSlice.reducer;
по какой то причине отображается только books, а error, он будто бы не видит, в чем может быть причина?