假设有一个父组件: useEffet(() => { // have returned their values via props (or context) return <div>{ children }</div>只有在所有的孩子都做了一些事情之后,我才能运行效果?我不知道孩子的确切人数,而且可能会有不同的情况:
// In this example there are 4 childr
实际上,我有一个服务器,它将输出作为promise返回。但是,当我在then函数中访问评论数据时,它就在那里。此外,我在我的网页上有一个按钮,可以在点击时执行一个功能。<button onclick="doThis()">Click</button> //this code is in the html doc