We have established that the dispatcher dispatches a message to anyone who will listen. Now it is time to be that listener. The dispatcher needs a register or subscribe method so that you, who listens, have the ability to listen for incoming messages. The setup for that usually looks something like this:
dispatcher.register(function(message){});
Now, when you set up a listener this way, it will have the capability to listen to any message type being sent. You want to narrow this down; usually, a listener is specified to only handle a few message types around a certain theme. Your listener most likely looks something like this:
dispatcher.register((message) => { switch(message.type) { case 'SELECT_ITEM': // do something ...