1.3.0 • Published 5 years ago

react-notie v1.3.0

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

NPM version Build Status Dependency Status Dev Dependency Status

NPM

React Notie

Simple notification for React.

Inspired from notie by @jaredreich

Table of Contents

Installation

Using npm

npm install --save react-notie

Using yarn

yarn add react-notie

Browser Support

  • Edge >= 12
  • FireFox >= 38
  • Chrome >= 47
  • Opera >= 34
  • Safari >= 9

Note: For other browsers like Safari < 9 and IE 11, you need to polyfill Object.assign and Promise.

Usage

  1. Render root of your app within <NotieProvider />.
  2. use withNotie decorator/hoc with the component where you want to notie.
  3. include react-notie/css/notie.css.
// index.js
import React from 'react';
import ReactDOM from 'react-dom';
import { NotieProvider } from 'react-notie';

const App = (
    <NotieProvider>
        <MyApp/>
    </NotieProvider>
)

ReactDOM.render(App, document.getElementById('root'));

// MyComponent.js
import React, { Component } from 'react';
import { withNotie } from 'react-notie';

class MyComponent extends Component {
    someAsyncAction = () => {
        fetch('/do-something').then(() => {
            this.props.notie.success('Thing Done!')
        });
    }

    render() {
        return (
            ......
        )
    }
}

export default withNotie(MyComponent);

API

API docs

Contributors

All Contributors

Changelog

For Changelog, see releases

License

MIT. Copyright(c) Vivek Kumar Bansal

2.0.0-alpha.5

5 years ago

2.0.0-alpha.4

5 years ago

2.0.0-alpha.3

6 years ago

2.0.0-alpha.2

6 years ago

2.0.0-alpha.1

6 years ago

1.3.0

7 years ago

1.2.2

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.1.0

7 years ago