You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd recommend going with <IntlProvider key={locale}> to force a full teardown until the underlying React context issue is resolved. react-intl issue 234
todo react context should
The text was updated successfully, but these errors were encountered:
context和生命周期探寻
标签(空格分隔): 未分类
组件的子组件以this.props.children形式传进去默认是不会update。
这个很好理解:
显示申明
this.props.children
但是如果组件上是有context无论是否改变也会更新子组件(this.props.children形式)
context用法
官网链接
tip: 子组件一定要写像这样的,不然收到的会是空的对象
这里重点说一个bug,当我们用react-intel和mobx的时候,由于各种各样的原因无法改变了context无法更新,所以我们很好奇。是不是context被block掉。
看这篇文章
要点:
17.6.29:
The text was updated successfully, but these errors were encountered: