in Output/GeminiPro_0801/JS/contextual_experiment/translate_to_react/1723455991/src/store/slices/todoSlice.ts [13:21]
id: nanoid(),
title: action.payload,
completed: false,
};
state.push(newTodo);
},
toggleTodo: (state, action) => {
const index = state.findIndex((todo) => todo.id === action.payload);
if (index !== -1) {