title: Cannot read property 'value' of null?
body: <p>I am getting error when I try to use <code>this.username.value</code>. I want to get value of textbox to show in label. I am newbie to react. How to get value from Textbox to a variable and display in Label using InputRef.</p>
  
  <pre><code>import React from 'react';
  import PropTypes from 'prop-types';
  import { connect } from 'react-redux';
  import Helmet from 'react-helmet';
  import { createStructuredSelector } from 'reselect';
  import TextBox from 'components/Atoms/TextBox';
  import makeSelectTestPage from './selectors';
  
  export class TestPage extends React.PureComponent {
    constructor(props) {
      super(props);
      this.username ='',
      this.handelChange = this.handelChange.bind(this);
    }
    handelChange() {
      console.log("Log",this.username.value);
      &lt;label&gt; this.username.value&lt;/label&gt;
    }
    render() {
      return (
        &lt;div&gt;
          &lt;Helmet
            title="TestPage"
            meta={[
              { name: 'description', content: 'Description of TestPage' },
            ]}
          /&gt;
          &lt;TextBox labelName="Input Vaue" placeholder="Test" ref={(inputRef) =&gt; { this.username = inputRef; }} defaultValue="Text" &gt;&lt;/TextBox&gt;
          &lt;button onClick={this.handelChange}&gt;Login&lt;/button&gt;
        &lt;/div&gt;
      );
    }
  }
  
  TestPage.propTypes = {
    dispatch: PropTypes.func.isRequired,
  };
  
  const mapStateToProps = createStructuredSelector({
    TestPage: makeSelectTestPage(),
  });
  
  function mapDispatchToProps(dispatch) {
    return {
      dispatch,
    };
  }
  
  export default connect(mapStateToProps, mapDispatchToProps)(TestPage);
  </code></pre>