1.2.2 • Published 6 years ago

nocms-events v1.2.2

Weekly downloads
15
License
ISC
Repository
github
Last release
6 years ago

NoCMS Events

Global events for NoCMS.

semantic-release Dependency Status devDependencies

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.