title: What is dispatchToken mean in flux Store (Dispatcher.register)?
body: <p>I practice react recently </p>
  
  <p>I see a code in company projects: </p>
  
  <pre><code>const TestStore = assign({}, EventEmitter.prototype, {
     emitReceiverList() {
        this.emit(Constants.RECEIVER_CHANGE) ;
     },
  
  }) ;
  //What is .dispatchToken
  TestStore.dispatchToken = AppDispatcher.register(function eventHandlers(event) {
     const action = event.action ;
  
     switch(action.actionType) {
        case Constants.DEV_SEARCH:
           info = action.value ;
           TestStore.emitReceiverList() ;
           break ;
  
        default:
           break ;
      }
  }) ;
  
  export default TestStore ;
  </code></pre>
  
  <p>And I refactor to :</p>
  
  <pre><code>const TestStore = assign({}, EventEmitter.prototype, {
  
     // emitReceiverList() {
     //    this.emit(Constants.RECEIVER_CHANGE) ;
     // },
  
     handleActions(action) {
        const new_action = action.action;
        switch(new_action.actionType) {
          case Constants.DEV_SEARCH:
             info = new_action.value ;
             //emit directly
             this.emit(Constants.RECEIVER_CHANGE) ;
             break ;
  
           default:
              break ;
         }
    }
  }) ;
  
  AppDispatcher.register(TestStore.handleActions.bind(TestStore));
  
  export default TestStore ;
  </code></pre>
  
  <p>It stiil works well,but I'm not sure whether there is side effect<br>
  So I want to ask what is TestStore.dispatchToken mean for??<br>
  Is it needed ???   </p>
  
  <p>I google and find this <code>https://github.com/sasha-bichkov/Flux-app/blob/d3c318f7cc6f33c2a96d76774b85a13acb792879/assets/javascripts/stores/BookStore.js</code> </p>
  
  <pre><code>let BookStore = assign({}, EventEmitter.prototype, {});
  
  BookStore.dispatchToken = AppDispatcher.register(function(action) {
    switch(action.type) {
      default: break;
    }
  });
  
  export default BookStore;
  </code></pre>
  
  <p>But I still don not know what is it used for??<br>
  Please guide me Thank you</p>