nocms-events

1.2.2 • Public • Published

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.

Readme

Keywords

Package Sidebar

Install

npm i nocms-events

Weekly Downloads

99

Version

1.2.2

License

ISC

Unpacked Size

11.3 kB

Total Files

9

Last publish

Collaborators

  • nocms