Testing React components that fetches data using Hooks

后端 未结 5 1423
不知归路
不知归路 2020-12-02 00:02

My React-application has a component that fetches data to display from a remote server. In the pre-hooks era, componentDidMount() was the place to go. But now I

5条回答
  •  既然无缘
    2020-12-02 00:06

    That issue is caused by many updates inside Component.

    I got the same issue, this would solve the issue.

    await act( async () => mount());
    

提交回复
热议问题