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

15.5版本下 DOMWrap: React.createClass is deprecated #81

Closed
blog-lyn opened this issue Apr 14, 2017 · 8 comments
Closed

15.5版本下 DOMWrap: React.createClass is deprecated #81

blog-lyn opened this issue Apr 14, 2017 · 8 comments

Comments

@blog-lyn
Copy link
Contributor

blog-lyn commented Apr 14, 2017

15.5 会警告不要从react import,不升级到15.5 其他dependencies 又会报unmet

Warning: Accessing PropTypes via the main React package is deprecated. Use the prop-types package from npm instead.
DOMWrap: React.createClass is deprecated and will be removed in version 16. Use plain JavaScript classes instead. If you're not yet ready to migrate, create-react-class is available on npm as a drop-in replacement.

src/DOMWrap.jsx 中需要修正:

// After (15.5)
import React from 'react';
import PropTypes from 'prop-types';
var createReactClass = require('create-react-class');
var Component = createReactClass({})

看到一天前修改了package.json lockdown to 15.4 是有什么计划么?
有升级的计划么? 还是可以提mr?

@blog-lyn blog-lyn changed the title rc-menu 15.5版本下 src/DOMWrap.jsx 15.5版本下 DOMWrap: React.createClass is deprecated Apr 14, 2017
@afc163
Copy link
Member

afc163 commented Apr 14, 2017

来个 PR

ant-design/ant-design#5678

@blog-lyn
Copy link
Contributor Author

好的

@blog-lyn
Copy link
Contributor Author

npm 上 rc-animate没有发布啊,不能通过测试

@blog-lyn
Copy link
Contributor Author

测试用例里 enzyme 貌似不能render出来

 Method “props” is only meant to be run on a single node. 0 found instead.

      at ReactWrapper.single (node_modules/enzyme/build/ReactWrapper.js:1419:17)
      at ReactWrapper.props (node_modules/enzyme/build/ReactWrapper.js:796:21)
      at Object.<anonymous> (tests/SubMenu.spec.js:134:49)

@yesmeck
Copy link
Member

yesmeck commented Apr 17, 2017

@afc163 发下 5.0.10

@afc163
Copy link
Member

afc163 commented Apr 17, 2017

done

@iamfoxuriel
Copy link

不建议在5.0.9 修改React 15.5.x依赖
因为这个原因只能回滚antd

@yesmeck yesmeck closed this as completed Apr 19, 2017
@yesmeck
Copy link
Member

yesmeck commented Apr 19, 2017

@iamfoxuriel 碰到了什么问题?

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

No branches or pull requests

4 participants