From f8d2aeefc3ebbbdda44eb01a65fb0c878e9e3b7f Mon Sep 17 00:00:00 2001 From: Wei Zhu Date: Fri, 28 Oct 2016 13:56:23 +0800 Subject: [PATCH] refactor: Replace react-addons-pure-render-mixin with rc-util/lib/PureRenderMixin (#3627) --- components/checkbox/Group.tsx | 2 +- components/checkbox/index.tsx | 2 +- components/form/Form.tsx | 2 +- components/form/FormItem.tsx | 2 +- components/radio/group.tsx | 2 +- components/radio/radio.tsx | 2 +- components/transfer/list.tsx | 2 +- package.json | 3 +-- typings/custom-typings.d.ts | 2 -- 9 files changed, 8 insertions(+), 11 deletions(-) diff --git a/components/checkbox/Group.tsx b/components/checkbox/Group.tsx index 4e81dd1bf8..34560fc42d 100644 --- a/components/checkbox/Group.tsx +++ b/components/checkbox/Group.tsx @@ -1,6 +1,6 @@ import React from 'react'; import Checkbox from './index'; -import PureRenderMixin from 'react-addons-pure-render-mixin'; +import PureRenderMixin from 'rc-util/lib/PureRenderMixin'; export interface CheckboxOptionType { label: string; diff --git a/components/checkbox/index.tsx b/components/checkbox/index.tsx index 8745839ffa..24ec40f210 100644 --- a/components/checkbox/index.tsx +++ b/components/checkbox/index.tsx @@ -2,7 +2,7 @@ import RcCheckbox from 'rc-checkbox'; import React from 'react'; import CheckboxGroup from './Group'; import classNames from 'classnames'; -import PureRenderMixin from 'react-addons-pure-render-mixin'; +import PureRenderMixin from 'rc-util/lib/PureRenderMixin'; import splitObject from '../_util/splitObject'; export interface CheckboxProps { diff --git a/components/form/Form.tsx b/components/form/Form.tsx index 2090d574ec..e54dfbfb2a 100755 --- a/components/form/Form.tsx +++ b/components/form/Form.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { PropTypes } from 'react'; import classNames from 'classnames'; -import PureRenderMixin from 'react-addons-pure-render-mixin'; +import PureRenderMixin from 'rc-util/lib/PureRenderMixin'; import omit from 'omit.js'; import warning from 'warning'; import assign from 'object-assign'; diff --git a/components/form/FormItem.tsx b/components/form/FormItem.tsx index fd7d98c36f..f4a29a4a16 100644 --- a/components/form/FormItem.tsx +++ b/components/form/FormItem.tsx @@ -1,7 +1,7 @@ import React from 'react'; import classNames from 'classnames'; import warning from 'warning'; -import PureRenderMixin from 'react-addons-pure-render-mixin'; +import PureRenderMixin from 'rc-util/lib/PureRenderMixin'; import Row from '../row'; import Col from '../col'; import { WrappedFormUtils } from './Form'; diff --git a/components/radio/group.tsx b/components/radio/group.tsx index b20d6310e1..fdeb52a0ee 100644 --- a/components/radio/group.tsx +++ b/components/radio/group.tsx @@ -2,7 +2,7 @@ import React from 'react'; import classNames from 'classnames'; import Radio from './radio'; import RadioButton from './radioButton'; -import PureRenderMixin from 'react-addons-pure-render-mixin'; +import PureRenderMixin from 'rc-util/lib/PureRenderMixin'; import assign from 'object-assign'; function getCheckedValue(children) { diff --git a/components/radio/radio.tsx b/components/radio/radio.tsx index a0f065130d..881737fe69 100644 --- a/components/radio/radio.tsx +++ b/components/radio/radio.tsx @@ -1,7 +1,7 @@ import RcRadio from 'rc-radio'; import React from 'react'; import classNames from 'classnames'; -import PureRenderMixin from 'react-addons-pure-render-mixin'; +import PureRenderMixin from 'rc-util/lib/PureRenderMixin'; export interface RadioProps { /** 指定当前是否选中*/ diff --git a/components/transfer/list.tsx b/components/transfer/list.tsx index 37821e7df0..f21183fec4 100644 --- a/components/transfer/list.tsx +++ b/components/transfer/list.tsx @@ -3,7 +3,7 @@ import Checkbox from '../checkbox'; import Search from './search'; import classNames from 'classnames'; import Animate from 'rc-animate'; -import PureRenderMixin from 'react-addons-pure-render-mixin'; +import PureRenderMixin from 'rc-util/lib/PureRenderMixin'; import assign from 'object-assign'; import { TransferItem } from './index'; diff --git a/package.json b/package.json index a1745f0175..ee83136bcf 100644 --- a/package.json +++ b/package.json @@ -70,8 +70,7 @@ "rc-tree": "~1.3.6", "rc-tree-select": "~1.8.0", "rc-upload": "~2.2.0", - "rc-util": "^4.0.0", - "react-addons-pure-render-mixin": "^15.0.0", + "rc-util": "^4.0.1", "react-slick": "~0.14.2", "shallowequal": "^0.2.2", "warning": "~3.0.0" diff --git a/typings/custom-typings.d.ts b/typings/custom-typings.d.ts index 92007c140f..2d82bbe31d 100644 --- a/typings/custom-typings.d.ts +++ b/typings/custom-typings.d.ts @@ -1,7 +1,5 @@ declare module 'classnames'; -declare module 'react-addons-pure-render-mixin'; - declare module 'rc-calendar*'; declare module 'rc-time-picker*';