track-eventor
v0.0.6
Published
Event manager for track.
Downloads
3
Readme
TrackEventor
Event manager for track.
Installation
npm
npm install track-eventor
Usage
const TrackEventor = require('track-eventor');
const TrackEventManager = require('track-eventor/lib/manager');
TrackEventManager.initialize();
// Dispatch event.
TrackEventor.dispatch('hoge', {foo: 'bar'});
// Get event names.
TrackEventor.ON_PUSH_HISTORY; // Dispatch when history push.
TrackEventor.ON_POP_HISTORY; // Dispatch when history pop.
TrackEventor.ON_CHANGE_HISTORY; // Dispatch when history pop or history push.