Why am I unable to return an HTML element after awaiting a promise in React

后端 未结 0 1383
没有蜡笔的小新
没有蜡笔的小新 2021-01-30 18:20

In the following example the index.js calls the component DiffState.js which is supposed to wait for 2 seconds (to simulate an async operation) and then return an an H1 element

相关标签:
回答
  • 消灭零回复
提交回复
热议问题