-
-
Notifications
You must be signed in to change notification settings - Fork 589
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: legacy context with function and class nesting cause RHL patch failed #431
base: 6.x
Are you sure you want to change the base?
Conversation
This pull request is being automatically deployed with ZEIT Now (learn more). 🔍 Inspect: https://zeit.co/react-component/table/iw7ylflyc |
Codecov Report
@@ Coverage Diff @@
## 6.x #431 +/- ##
=======================================
Coverage 89.49% 89.49%
=======================================
Files 16 16
Lines 838 838
Branches 245 245
=======================================
Hits 750 750
Misses 88 88
Continue to review full report at Codecov.
|
这里修改的Context处理方式是同一版本发布的同一套API 分别在函数式组件和class组件的两种形式吧? |
@yoyo837 是的,但是当 class 和 function 嵌套的时候,会导致 RHL 的问题,可以看这个 issue:ant-design/ant-design#22136 |
antd 3.x 还需要对 React 15 进行支持,请检查相关用法。 |
所以不存在更换已废弃的API这回事。 |
@yoyo837 嗯,没有更换,只是换成 |
好的,我 check 一下,主要是替换掉 |
antd |
OK,我 link 到 antd 那边跑一下 |
@afc163 我跑了一下 antd 我看了一下 React15 的源码, |
看了一下 |
|
|
@yoyo837 我试了一下,我这里的测试用例生成的 |
可以再测测,3.x-stable 自身的问题修复过了。 |
@jas0ncn ping~ |
pong 😅 之前有点忙,这两天我抽空看看~ |
ping |
该 PR 为了修复 Ant Design 3.x issue #22136
Table 表格使用了已经废弃的
Context
处理方式,因为class
和function
的嵌套,导致 React Hot Loader patch 更新的时候失败。从 RHL 的 issue 中找到了点蛛丝马迹,由此处理了这个问题。此 PR 将所有的
stateless function component
改为了pure class component
的形式。注意:这本不是
rc-table
的问题,但是 RHL 似乎停止了对 Legacy Context 的支持,只能设置为忽略热更新,所以由rc-table
修复问题。