首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >componentDidMount更新state如何在componentWillMount中使用?

componentDidMount更新state如何在componentWillMount中使用?

提问于 2019-05-21 23:31:50
回答 0关注 0查看 494

我在componentDidMount()中获取网络数据存在state中,如何在componentWillMount()中使用,我在componentWillMount()中打印data是空值。最好贴代码给我, 我知道did只加载一次 但是网上都说在did中获取数据, will中显示, 但是就是不知道怎么写

回答

和开发者交流更多问题细节吧,去 写回答
相关文章

相似问题

相关问答用户
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档