Skip to content
Mikkel Malmberg edited this page Apr 8, 2015 · 2 revisions

If you want to listen to an action without implementing a whole store you can use ActionListeners from the alt utils.

import ActionListeners from 'alt/utils/ActionListeners'

const listener = new ActionListeners(alt)

listener.addActionListener(actions.DO_THIS, (thing) => {
  console.log(`doing ${thing}`)
})

/* ... and don't forget to remove listeners when you're done */
listener.removeAllActionListeners()
Clone this wiki locally