This commit is contained in:
Boyuzhou 2016-10-11 13:30:13 +08:00
parent 58d90362ca
commit 92c56c145c
1 changed files with 4 additions and 4 deletions

View File

@ -49,9 +49,9 @@ const classString = classNames('hide', class1, class2);
```javascript
//引入依赖
let React = require('react');
let ReactDOM = require('react-dom');
let classnames = require('classnames');
import React from 'react';
import ReactDOM from'react-dom';
import classnames from 'classnames';
//定义prop检验
const propTypes = {
@ -84,7 +84,7 @@ class Button extends React.Component {
Button.propTypes = propTypes;
Button.defaultProps = defaultProps;
module.exports = Button;
export default Button;
```