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
Migrate to new lifecycle methods #9792
Comments
16.3 |
正在在搞 select 我要 select |
Guys I am using antd in one of my projects and it's awesome, How can I do anything regarding to this issue |
@saostad You can pick up a component, and rewrite the legacy lifecycle methods with the new lifecycle method, see this PR react-component/table#198 as a example. |
count me on |
Can I work on datepicker and modal ?? @yesmeck |
I'll be working on |
@Rohanhacker Of course. |
on |
ill try |
More version detect and compatibility code.... |
taking tabs |
interested in |
…picker First of all, thank you for your contribution! :-) Please makes sure that these checkboxes are checked before submitting your PR, thank you! * [x] Make sure that you propose PR to right branch: bugfix for `master`, feature for latest active branch `feature-x.x`. * [x] Make sure that you follow antd's [code convention](https://github.com/ant-design/ant-design/wiki/Code-convention-for-antd). * [x] Run `npm run lint` and fix those errors before submitting in order to keep consistent code style. * [x] Rebase before creating a PR to keep commit history clear. * [x] Add some descriptions and refer relative issues for you PR. Extra checklist: **if** *isBugFix* **:** no **elif** *isNewFeature* **:** #9792
Hi, is this still in progress❓ |
@ahsannaveed007 yes |
|
@afc163 Does the latest release ( |
make sure you update all of the dependencies of ant too as a number of the fixes are in external components (rc-form, rc-animate, etc) |
Ah yes, you're right , the final thing i had to do was change react-dom to |
@afc163 - I updated completely all dependencies in project and I still got warnings for some components: Redirect, Trigger. |
@pavolgolias i was receiving the same result as you. To fix it, in my yarn.lock file I deleted all the |
I deleted package-lock.json and all node_modules, reinstalled the dependencies but I got still the same result. I suppose I am going to wait for new releases of rc-* components (not the beta ones) and for update of antd required components list @afc163. |
Current rc-* components have already resolved react lifecycle warning now. If you still meet this problem, could you provide a reproducible repo and steps to reproduce? |
@pavolgolias @afc163 the offending component is actually I went ahead and made a repo from scratch (with Thank you |
@Indigo744 , thanks for report. Updated, please check. |
There are some duplicate components required with these fixes -- they don't seem to cause any issues, but multiple copies of rc-animate, rc-tree and rc-trigger are now required: antd 3.2.6 references: rc-tree-select@~2.9.1 references: rc-trigger@^3.0.0-rc.2 references: rc-tree-select@~2.9.1 references: |
Thank you @zombieJ @afc163 I can confirm the warning is gone 😸 However, the remarks from @blushingpenguin is interesting. If multiple version are used, does this mean a larger bundle size? |
Thanks for the update. I got still one warning left, but I found out it is another lib and not the antd. |
Reading through the comments and status it looks like all the components have migrated, But I am still getting the same warning for InnerSlider and Slider components. attaching log and screenshot below Warning: Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://fb.me/react-unsafe-component-lifecycles for details.
* Move code with side effects to componentDidMount, and set initial state in the constructor.
Please update the following components: InnerSlider, Slider And Warning: Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://fb.me/react-unsafe-component-lifecycles for details.
* Move data fetching code or side effects to componentDidUpdate.
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state
Please update the following components: InnerSlider I am using |
Same problem with Modal and antd 4.3.4 |
same for me. Should we reopen the ticket? |
React 16.3 will introduce a StrictMode which will fires deprecation warnings for
componentWillMount
,componentWillUpdate
,componentWillReceiveProps
. We should migrate antd's components to the new API,react-af can be a good start.Here is a todo list, if you have interest in helping, drop a comment below.
The text was updated successfully, but these errors were encountered: