title: ReactJS. How to get the ClassList and other DIV props by ref in React
body: <p>So, I try to add an extra class to the classList of the some <code>i</code> element, but now I fall into the problem with standart <code>div.classList.add('you-class')</code> method, because when I try to use it with React ref system - I even got an error - <code>cannot get classList of null</code>... Why?</p>
  
  <pre><code>export class Cd extends Component {
    constructor(props) {
      super(props);
  
      this.refCDImg = React.createRef();
    }
  
    render() {
      console.log( this.refCDImg.current ); // all good
      this.refCDImg.current.classList.add('disk-image-large--waiting'); // error
  
      return(
         // ...some code
          &lt;i ref={this.refCDImg} className={'d-img-large'} /&gt;
  // ...some code
      )
    }
  }
  </code></pre>