Skip to content

Commit

Permalink
fix react16 warning, ref ant-design/ant-design-mobile#1118
Browse files Browse the repository at this point in the history
  • Loading branch information
silentcloud authored and paranoidjk committed Jun 26, 2017
1 parent 78639b3 commit 349f36f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"devDependencies": {
"coveralls": "^2.11.15",
"jest": "^20.0.0",
"@types/jest": "^19.2.4",
"@types/react": "~0.14.41",
"@types/react-dom": "~0.14.18",
"@types/react-native": "~0.29.36",
Expand All @@ -68,6 +69,7 @@
],
"dependencies": {
"babel-runtime": "6.x",
"create-react-class": "^15.5.4",
"moment": "2.x",
"rmc-picker": "^3.8.0"
}
Expand Down
3 changes: 2 additions & 1 deletion src/DatePicker.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import createReactClass from 'create-react-class';
import MultiPicker from 'rmc-picker/lib/MultiPicker';
import IDatePickerProps from './IDatePickerProps';
import moment from 'moment';
Expand All @@ -22,7 +23,7 @@ const TIME = 'time';
const MONTH = 'month';
const YEAR = 'year';

const DatePicker = React.createClass<IDatePickerProps, any>({
const DatePicker = createReactClass<IDatePickerProps, any>({
getDefaultProps() {
return {
prefixCls: 'rmc-date-picker',
Expand Down
3 changes: 2 additions & 1 deletion src/Popup.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import createReactClass from 'create-react-class';
import IDatePickerProps from './IDatePickerProps';
import PopupPicker from 'rmc-picker/lib/Popup';
import { IPopupPickerProps } from 'rmc-picker/lib/PopupPickerTypes';
Expand All @@ -8,7 +9,7 @@ export interface IPopupDatePickerProps extends IPopupPickerProps {
onChange?: (date?) => void;
date?: any;
}
const PopupDatePicker = React.createClass<IPopupDatePickerProps, any>({
const PopupDatePicker = createReactClass<IPopupDatePickerProps, any>({
getDefaultProps() {
return {
pickerValueProp: 'date',
Expand Down
1 change: 0 additions & 1 deletion tests/simple.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* tslint:disable:no-unused-variable */
import React from 'react';
import ReactDOM from 'react-dom';
import $ from 'jquery';
Expand Down

0 comments on commit 349f36f

Please sign in to comment.