title: How can I setup edit item functionality in this React application?
body: <p>I have a React application I am building to learn React which adds Income, Expenditure and logs Transactions.</p>
  
  <p>I am struggling with how to go about setting up the ability to edit an entry.</p>
  
  <p>So I have a series of entries for each. The Expenditure entries React class is as follows:</p>
  
  <pre><code>const Expenditure = React.createClass({
    renderExpenditure(key) {
      const details = this.props.cashbook[key];
      return(
        &lt;tr className="item" key={key}&gt;
          &lt;td&gt;&lt;strong&gt;{details.name}&lt;/strong&gt;&lt;/td&gt;
          &lt;td&gt;&lt;strong&gt;{h.formatPrice(details.amount)}&lt;/strong&gt;&lt;/td&gt;
          &lt;td&gt;{details.category}&lt;/td&gt;
          &lt;td&gt;{details.type}&lt;/td&gt;
          &lt;td&gt;{details.date}&lt;/td&gt;
          &lt;td&gt;&lt;button className="remove-item" onClick={this.props.removeCashflow.bind(null, key, 'expenditure')}&gt;Remove&lt;/button&gt;&lt;/td&gt;
        &lt;/tr&gt;
      );
    },
    render() {
      return(
        &lt;div className="expenditure"&gt;
          &lt;table id="exp-table"&gt;
            &lt;tbody&gt;
              {Object.keys(this.props.cashbook || {}).map(this.renderExpenditure)}
            &lt;/tbody&gt;
          &lt;/table&gt;
        &lt;/div&gt;
      );
    }
  });
  </code></pre>
  
  <p>And removeCashflow, in the main App component, looks like:</p>
  
  <pre><code>removeCashflow(key, type) {
      this.state.cashbook[type][key] = null;
      this.setState({
        cashbook: { [type]: this.state.cashbook[type] }
      });
    },
  </code></pre>
  
  <p>Does anyone have any pointers or advise as to the best way to set up the ability to edit an entry in React?</p>
  
  <p>Unsure of where to start.</p>
  
  <p>Thank you :)</p>