A global notification wrapper for react-toastify built with the React Context API
npm install context-notification> A global notification wrapper for react-toastify built with the React Context API
 
``bash`
npm install --save context-notification
`bash`
yarn add context-notification
`jsx
import React from 'react';
import { NotificationProvider } from 'context-notification';
import ReactDOM from 'react-dom';
import App from './App';
ReactDOM.render(
`
`jsx
import React, { Component } from 'react';
import { Notifier } from 'context-notification';
export default class App extends Component {
render() {
return (
notifyFailure();
return (
$3
`jsx
import React, { Component } from 'react';
import { withNotifier } from 'context-notification';
class App extends Component {
render() {
const { notifySuccess, notifyFailure } = this.props;
notifySuccess({ position: 'top-left' });
notifyFailure();
return (
Hello React
)
}
}export default withNotifier(App);
``MIT © AwoyoToyin