readTodos()是一个redux操作创建器,它从localstorage获取Todo项并将它们存储在redux状态(globalstate)中。我想在useEffect函数中调用readTodos()函数,并更新globalstate变量,该变量将在第一次呈现时显示ViewTodos组件中的所有TodoItems。但是,当组件加载时,不会调用readTodos()操作,也不会填充list in
我有一个 and表单,当我按下提交按钮时,就可以在onFinish function中获取表单数据,在该按钮中,我希望使用uesEffect hook,并将表单数据作为有效负载分派到redux中,但我得到了以下错误React Hook "useEffect" is called in function "onFinish" that is neither a React function component nor如果我在