old_contents: import React, { Component } from 'react'
  
  import assert from './util/assert'
  import createDispatcher from './createDispatcher'
  
  function isDispatcher(obj) {
    return (
      typeof obj === 'object' &&
      typeof obj.subscribe === 'function' &&
      typeof obj.reduce === 'function' &&
      typeof obj.schedule === 'function'
    )
  }
  
  export default class Provider extends Component {
    static propTypes = {
      dispatcher: React.PropTypes.object
    };
  
    static childContextTypes = {
      dispatcher: React.PropTypes.object
    };
  
    getChildContext() {
      if (this.props.dispatcher) {
        assert(isDispatcher(this.props.dispatcher), 'Expected a Dispatcher to be passed in the dispatcher prop.')
        return { dispatcher: this.props.dispatcher }
      }
  
      if (!this.dispatcher) {
        this.dispatcher = createDispatcher()
      }
  
      return { dispatcher: this.dispatcher }
    }
  
    render() {
      return this.props.children
    }
  }
  
new_contents: import React, { Component } from 'react'
  import assert from './util/assert'
  import isObservable from './util/isObservable'
  
  export default class Provider extends Component {
    static propTypes = {
      observable: React.PropTypes.object.isRequired
    };
  
    static childContextTypes = {
      dispatcher: React.PropTypes.object
    };
  
    getChildContext() {
      assert(isObservable(this.props.observable), 'Expect prop observable to be an observable.')
      return { observable: this.props.observable }
    }
  
    render() {
      return this.props.children
    }
  }
  
subject: Make Provider take an observable prop