my current store looks like this:
import { configureStore } from "@reduxjs/toolkit";
import notesReducer from "./notesReducer";
import todoReducer from "./todoReducer";
const store = configureStore({
reducer: todoReducer, // here i wanna add a notesReducer
});
export default store;
As said, i wanna add a notesReducer and what i have seen in tutorial i could do it by that:
const store = configureStore({
reducer: { todo: todoReducer, note: notesReducer },
});
But this althoug, deploy an errror in my Todos.js file: TypeError: props.todos.map is not a function
Whole Todos.js file so you could help me finding the solution or things I did wrong: https://pastebin.com/AWyg8BXW
Shouldn't your mapStateToProps be
const mapStateToProps = (state) => {
return {
todos: state.todos,
};
};