```
render () {
  <input type="number" value={this.props.value} />
}
```

for example, when the original value is '.98', we need format it to '0.98'. but it is not  take effect。

```javascript
class Test extends React.Component {
 state = {
    value: '.98',
  }
 changeValue = () => {
    alert(0.98);
    this.setState({
      value: '0.98',
    });
  }

 render() {
    return <div>
      <input type="number" value={this.state.value} />
      <button onClick={this.changeValue}>changeValue</button>
    </div>;
  }
}

ReactDOM.render(<Test />, mountNode);
```



state = {
          value: 2,
        };
        onChange = event => {
          this.setState({value: event.target.value});
        };
        render() {
          const {value} = this.state;
          return <input type="text" value={value} onChange={this.onChange} />;
        }
      }
      var stub = ReactTestUtils.renderIntoDocument(<Stub />);
      var node = ReactDOM.findDOMNode(stub);
      node.value = '2.0';
      ReactTestUtils.Simulate.change(node);
      expect(node.getAttribute('value')).toBe('2.0');
      expect(node.value).toBe('2.0');
    });
  });
  it('should display `defaultValue` of number 0', () => {
    var stub = <input type="text" defaultValue={0} />;
    stub = ReactTestUtils.renderIntoDocument(stub);
    var node = ReactDOM.findDOMNode(stub);
    expect(node.getAttribute('value')).toBe('0');
    expect(node.value).toBe('0');
  });
  it('only assigns defaultValue if it changes', () => {
    class Test extends React.Component {