title: React-table Individual Cell Style
body: <p>I am using react-table and want to change the background color of specific cells based on their number inside. Ex. Cell > 1 = green, Cell &lt; 1 = Red, and different shades in-between. I have seen a ton of stuff about coloring rows and columns, but am struggling on how to color specific cells based on the data that is loaded.</p>
  
  <p>I know this code doesn't work, but hopefully it will show kind of what I am looking for:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>&lt;ReactTable
    data={data}
    columns={columns}
    getTdProps={(cellInfo) =&gt; {
        return {
          if (cellInfo.value &gt; 1) {
              cellInfo.className = "green-cell";
          }
          if (cellInfo.value &lt; 1) {
              cellInfo.className = "red-cell";
          }
        };
      }}
  /&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Hopefully that makes sense. Thanks for the help.</p>