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

Comments

@ywy94ywy
Copy link

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

This comment has been minimized.

Copy link
Member

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 Aug 9, 2019

@shx996

This comment has been minimized.

Copy link

commented Aug 9, 2019

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

这个警告也会有

@zombieJ zombieJ referenced this issue Aug 9, 2019
0 of 4 tasks complete
@Daniel-Kao

This comment has been minimized.

Copy link

commented Aug 15, 2019

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

@ycjcl868 ycjcl868 referenced this issue Aug 16, 2019
0 of 4 tasks complete
@GeNa-jj

This comment has been minimized.

Copy link

commented Aug 20, 2019

请问怎么解决?

@wangxingkang

This comment has been minimized.

Copy link
Contributor

commented Aug 21, 2019

固定版本 就可以吧

@wangxingkang

This comment has been minimized.

Copy link
Contributor

commented Aug 21, 2019

"react": "16.8.6",
"react-dom": "16.8.6"
@shx996

This comment has been minimized.

Copy link

commented Aug 21, 2019

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

@GeNa-jj

This comment has been minimized.

Copy link

commented Aug 21, 2019

固定版本也没用

@GeNa-jj

This comment has been minimized.

Copy link

commented Aug 21, 2019

@GeNa-jj

This comment has been minimized.

Copy link

commented Aug 21, 2019

@shx996 我也没解决😩

@wangxingkang

This comment has been minimized.

Copy link
Contributor

commented Aug 21, 2019

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

@shx996

This comment has been minimized.

Copy link

commented Aug 21, 2019

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

@GeNa-jj

This comment has been minimized.

Copy link

commented Aug 21, 2019

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

@wangxingkang

This comment has been minimized.

Copy link
Contributor

commented Aug 22, 2019

@shx996 写死antd版本

@wangxingkang

This comment has been minimized.

Copy link
Contributor

commented Aug 22, 2019

或者等着Umi 解决

@wangxingkang

This comment has been minimized.

Copy link
Contributor

commented Aug 22, 2019

最新umi版本已修复

@jianhunxia

This comment has been minimized.

Copy link

commented Aug 29, 2019

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

@wangxingkang

This comment has been minimized.

Copy link
Contributor

commented Aug 30, 2019

这是 react 的警告 与 umi 无关

@ShawDanon

This comment has been minimized.

Copy link

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
Projects
None yet
8 participants
You can’t perform that action at this time.