We created a set of utilities to make it easier to create and add functionality to plugins. Feel free to check all the utilities here: talk/plugin-api.

Actions

Admin

Auth

Notification

Stream

Import

import {notify} 'plugin-api/beta/actions';

Usage

// Trigger a notification
notify('success', t('suspenduser.notify_suspend_until', username, timeago(until))

// mapDispatchToProps
const mapDispatchToProps = dispatch => ({
  ...bindActionCreators(
    {
      notify,
    },
    dispatch
  ),
});

Components

Props