我正在使用React钩子(钩子的新手),今天发现了一个bug。更改状态后,内容不会像应该的那样重新呈现。代码如下:
const App = () => {
const [messeges, UpdataMesseges] = useState([]);
//here's the code for updating the state, but even after changing the state it's not
//re-rendering the content on the page.
const sendMessege =