title: componentWillRecieveProps current props
body: <p>I'm writing a component of the form</p>
  
  <p><code>&lt;MyComponent sources={this.state.sources} /&gt;</code></p>
  
  <p>When the component is first mounted, <code>sources={{}}</code>, an empty dictionary. Since this component is wrapping an existing Javascript library, I'm implementing a custom diffing function. In order for this diffing function to work the first time, it needs to know that <code>this.props.sources = {}</code> the first time and <code>this.props.sources= { ... stuff ... }</code> on subsequent updates. The React docs say that <code>componentWillRecieveProps</code> is not called on initial mount, but I'm trying to do the following:</p>
  
  <pre><code>componentWillReceiveProps(nextProps) {
      console.log(this.props.sources)
  }
  </code></pre>
  
  <p>After initializing <code>MyComponent</code> with <code>sources={{}}</code>, I pass it some <code>sources={... stuff ...}</code>, and I expected, <code>this.props.sources</code> inside <code>componentWillReceiveProps</code> to be <code>{}</code> since the <code>nextProps</code> haven't yet been updated. However, <code>this.props.sources</code> returns <code>{... stuff ...}</code>, the most recent props passed in.</p>