Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@bufferapp/notifications

Package Overview
Dependencies
Maintainers
13
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bufferapp/notifications

Display application notifications

  • 1.2.5
  • npm
  • Socket score

Version published
Weekly downloads
9
decreased by-72.73%
Maintainers
13
Weekly downloads
 
Created
Source

@bufferapp/notifications

Create a notification that disappears after 5 seconds or when the user closes it.

Setup

Add Reducer And Middlware To Store

import {
  createStore,
  combineReducers,
  applyMiddleware,
} from 'redux';
import { middleware, reducer } from '@bufferapp/notifications';

const store = createStore(
  combineReducers({
    notifications: reducer, // add notifications reducer under the `notifications` state tree
  }),
  {/* initial state */},
  applyMiddleware(middleware),
);

Add Notifications Within The React Redux Provider

import { Provider } from 'react-redux';
import Notifications from '@bufferapp/notifications';

<Provider store={store}>
  <Notifications />
</Provider>

API

createNotification

notificationType string the type of notification to display, success or error controls the icon

message string the message to display on the notification


import { actions } from '@bufferapp/notifications';

// dispatch the createNotification action with the redux store

store.dispatch(actions.createNotification({
  notificationType: 'success',
  message: 'Hooray! A notification appears!',
}));

FAQs

Package last updated on 17 Jan 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc