nocms-events
v1.2.2
Published
Global events for NoCMS
Downloads
279
Readme
NoCMS Events
Global events for NoCMS.
Installation
Install nocms-events from NPM and include it in your own React build process (using Browserify, Webpack, etc).
npm install nocms-events --save
Usage
import events from 'nocms-events';
events.trigger('form_sent', this.props.store);
API
listenTo, (eventName, function)
Listen to an event with specified name, and call the function when the event occurs
stopListenTo, (eventName, function)
Stop listen to the event
trigger, (eventName, args)
Trigger an event with the specified name and calls each listener's function with the supplied args
Commit message format and publishing
This repository is published using semantic-release
, with the default AngularJS Commit Message Conventions.