Skip to content
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

8月9日版本craete umi自带警告 #2966

Closed
ywy94ywy opened this issue Aug 9, 2019 · 19 comments · Fixed by #2993
Closed

8月9日版本craete umi自带警告 #2966

ywy94ywy opened this issue Aug 9, 2019 · 19 comments · Fixed by #2993

Comments

@ywy94ywy
Copy link

ywy94ywy commented Aug 9, 2019

Warning: componentWillMount has been renamed, and is not recommended for use.

Warning: componentWillReceiveProps has been renamed, and is not recommended for use.

8月9日yarn create umi 并安装依赖后,直接启动会报2条警告,取了两条警告的第一句。

@ycjcl868
Copy link
Contributor

ycjcl868 commented Aug 9, 2019

https://github.com/facebook/react/releases/tag/v16.9.0 也是 8.9 发布的,componentWillMount componentWillReceiveProps 属于将被 react 废弃 api。

相关 facebook/react#15186 facebook/react#16103

@ycjcl868 ycjcl868 closed this as completed Aug 9, 2019
@ghost
Copy link

ghost commented Aug 9, 2019

index.js:1 Warning: [antd: LocaleProvider] LocaleProvider is deprecated. Please use locale with ConfigProvider instead:

这个警告也会有

@Daniel-Kao
Copy link

我这边也提示,一般怎么解决呢?

@GeNa-jj
Copy link

GeNa-jj commented Aug 20, 2019

请问怎么解决?

@wangxingkang
Copy link
Member

固定版本 就可以吧

@wangxingkang
Copy link
Member

"react": "16.8.6",
"react-dom": "16.8.6"

@ghost
Copy link

ghost commented Aug 21, 2019

目前 create umi 脚手架中这些警告还是存在的

@GeNa-jj
Copy link

GeNa-jj commented Aug 21, 2019

固定版本也没用

@GeNa-jj
Copy link

GeNa-jj commented Aug 21, 2019

https://zh-hans.reactjs.org/blog/2019/08/08/react-v16.9.0.html 看看这个能不能解决吧

@GeNa-jj
Copy link

GeNa-jj commented Aug 21, 2019

@shx996 我也没解决😩

@wangxingkang
Copy link
Member

可以解决的啊,试一下 https://github.com/ts-react/react-mobile-template

@ghost
Copy link

ghost commented Aug 21, 2019

@wangxingkang 写死版本可以的,但是index.js:1 Warning: [antd: LocaleProvider] LocaleProvider is deprecated. Please use locale with ConfigProvider instead:这个你是怎么解决的

@GeNa-jj
Copy link

GeNa-jj commented Aug 21, 2019

@wangxingkang 真的解决了,谢谢谢谢谢谢谢谢😄

@wangxingkang
Copy link
Member

@shx996 写死antd版本

@wangxingkang
Copy link
Member

或者等着Umi 解决

@wangxingkang
Copy link
Member

最新umi版本已修复

@jianhao
Copy link

jianhao commented Aug 29, 2019

用了最新的[email protected] 创建项目,仍然会有这个问题。固定react和react-dom为"16.8.6"后,删除依赖,重新安装依赖,就没再报[email protected]的警告了。

@wangxingkang
Copy link
Member

这是 react 的警告 与 umi 无关

@txp1035
Copy link
Member

txp1035 commented Aug 30, 2019

新版antd的LocaleProvider废弃了嘛,改用ConfigProvider就好了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants