obi*_*ahn 8 debugging google-chrome create-react-app
我使用Create React App创建了一个应用程序。
如何添加resetDatabase()可从Chrome调试控制台(或其他方式)调用的全局调试功能(例如)?
小智 2
您可以将该函数附加到全局窗口对象或某个命名空间对象。
\n\n然后在控制台中您可以使用以下命令运行它:
\n\nwindow.resetDatabase();
\n\nHere\xe2\x80\x99s 是有关通过 componentWillMount 回调访问全局上下文的相关帖子的链接。
\n\n\n| 归档时间: |
|
| 查看次数: |
109 次 |
| 最近记录: |