Skip to content

brainattica/react-notification-center-bad

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

React Notification Center

Notification center worked on top of react and inspired on Flux to dispatch events

This is prepared to be used with Webpack and written with ES6.

You should have to use a transpiler like Babel.

Example

Add it to the root of your page:

var NotificationCenter = require('react-notification-center');

class MyPage extends React.Component {

	render() {
		<div>
			...
			<NotificationCenter />
			...
		</div>
	}

}

And now you can use it from the Component you want:

var NotificationDispatcher = require('react-notification-center').Dispatcher;

class MyComponent extends React.Component {

	render() {
		<div>
			<button onClick={this.onClick}>Show notification</button>
		</div>
	}

	onClick() {
		NotificationDispatcher.error({title: 'Registro', message: 'Error al registrar'});
	}

}

About

A complete notification system written in react

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published