diff --git a/components/badge/index.jsx b/components/badge/index.jsx index d4ccb5f783..133955f00d 100644 --- a/components/badge/index.jsx +++ b/components/badge/index.jsx @@ -4,10 +4,6 @@ const prefixCls = 'ant-badge'; class AntBadge extends React.Component { constructor(props) { super(props); - - this.state = { - count: props.count - }; } render() { @@ -17,13 +13,13 @@ class AntBadge extends React.Component { ; } - let count = this.state.count; + let count = this.props.count; if (!count) { return cloneElement(this.props.children); } else { count = count >= 100 ? '99+' : count; return ( - + {this.props.children} {count}