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

React 15.x支持 #9

Merged
merged 4 commits into from
Oct 16, 2017
Merged

React 15.x支持 #9

merged 4 commits into from
Oct 16, 2017

Conversation

paseo
Copy link
Contributor

@paseo paseo commented Oct 15, 2017

改动内容:

  1. 按照升级文档执行yo uxcore:upgrade命令,更新package.json
  2. 使用ES6 modules代替commonjs
  3. 使用prop-types替换React.PropTypes
  4. 去除object-assign的冗余依赖
  5. 使用static语法定义displayName、propTypes、defaultProps属性
  6. eslint添加"parser": "babel-eslint",支持ES6语法lint检查
  7. 修复tnpm run lint抛出的代码格式错误

src/Carousel.jsx Outdated
@@ -9,6 +9,11 @@
// matchMedia polyfill for
// https://github.com/WickyNilliams/enquire.js/issues/82

import classnames from 'classnames';
import * as React from 'react';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里直接 import React 应该就可以了吧。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

都可以的

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@paseo 是都可以,但是感觉这样意义不大,为了统一,还是都改成 import React 好了

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已改

src/index.js Outdated
module.exports = require('./Carousel');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这一行没有 ES6 化。

@coveralls
Copy link

Coverage Status

Coverage increased (+9.8%) to 72.0% when pulling 0247ad8 on paseo:master into 1f251ff on uxcore:master.

@paseo paseo merged commit 92b3940 into uxcore:master Oct 16, 2017
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 this pull request may close these issues.

None yet

3 participants