diff --git a/redux/toolkit/src/components/page1.jsx b/redux/toolkit/src/components/page1.jsx index ed8ef4582..456aac666 100644 --- a/redux/toolkit/src/components/page1.jsx +++ b/redux/toolkit/src/components/page1.jsx @@ -1,4 +1,3 @@ -import {useEffect} from 'react' import {addTodo} from '../store/todosReducer' import {useSelector, useDispatch} from 'react-redux' function Hehe(){ @@ -7,15 +6,17 @@ function Hehe(){ } const {todos}=useSelector(state=>state.todos) const dispatch=useDispatch() - useEffect(()=>{ - test1() - },[]) - console.log(todos) return (

page1

- + { + todos.map((todo,index)=>{ + return ( +
  • {todo.text}
  • + ) + }) + }
    ) }