title: How to add or remove a className when screen size change in react
body: <p>I want the className should be added or removed automatically when the screen size changes.</p>
  
  <p>I tried using media queries, but that didn't really work for me. In my stylesheet I have predefined classes for example:</p>
  
  <p><code>.bold { font-weight: bold;}
  </code></p>
  
  <p>and this classes cannot be added or removed using media queries.</p>