title: How to do an observable function in Mobx?
body: <p>I have store with a collection which I want to be read only. I wish to do something like but I don't know if Mobx provides a way to create a reactive function.</p>
  
  <pre><code>class Store{
    private _col:Mobx.Map;
    ...
  
    @observable public has(id){
      return _col.has(id);
    }       
  }
  </code></pre>
  
  <p>I am on a game architecture with no-trust-the-client in mind. So I don't want my view to get direct access to <code>_col</code>.</p>
  
  <pre><code>@observe
  class MyView extends Component {
    ...
    componentWillMount(){
      this.id = this.props.params.id;
      autorun(()=&gt;{
        this.props.store.has(this.id)
        //do something smart
      }
    }
  
    ...
  }
  </code></pre>
  
  <p>What could be the alternatives?</p>