title: How to use state from an input to change cell value in react-tables
body: <p>I want a table where cells display dynamic data based on use input. Example:</p>
  <p><a href="https://i.stack.imgur.com/JsA8r.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JsA8r.png" alt="enter image description here" /></a></p>
  <p>By default, cells just show the teacher's name. But if a user selects <code>age</code>, cells would display something like <code>Mrs. J (32)</code>. If they select <code>tenure</code>, the cell shows <code>Mrs. J (6)</code></p>
  <p><a href="https://codesandbox.io/s/little-forest-v4o5fc?file=/src/App.js" rel="nofollow noreferrer">https://codesandbox.io/s/little-forest-v4o5fc?file=/src/App.js</a></p>
  <p>The part I'm struggling with is how do I get the state from the selection into the <code>accessor</code> attribute of <code>columns</code>, so that I can dynamically construct the new cell value?</p>