4.1.1 • Published 4 years ago

rns-redux v4.1.1

Weekly downloads
18
License
MIT
Repository
github
Last release
4 years ago

RNS Redux

A reimagining of React-Notification-System in Typescript, with an API that supports React Hooks.

Github: https://github.com/justindujardin/rns-redux/

Website: https://justindujardin.github.io/rns-redux/

Project Health

Check TypeStatus
Master BuildTravis
Code CoverageCoveralls
Dependency UpdaterGreenkeeper badge
Up-to-date DependenciesNPM Dependencies
Up-to-date DevDependenciesNPM Dev Dependencies
ContributorsAll Contributors

Usage

Install the library:

npm install --save rns-redux

Add the NotifyProvider near the top of your app. By default this will include a component NotifyPortal as a child that will render the notifications. This can be disabled if the NotifyPortal is manually placed elsewhere.

<NotifyProvider>
  <YourApp/>
</NotifyProvider>

Under the covers React's useReducer API is the default store for notifications state, which is local to the provider component instance.

Show a notification:

export function MyHookComponent() {
  const { api } = useNotify()
  api.showNotification({
    level: 'info',
    message: 'hi'
  })
}

Credits

Typescript library starter by @alexjoverm

React Components based on React-Notification-System

Thanks to the wonderful people that contribute to this project (emoji key):

Justin DuJardin⚠️ 💻 🚇Alex Jover🚇

This project follows the all-contributors specification. Contributions of any kind welcome!

4.1.1

4 years ago

4.1.0

4 years ago

4.0.1

5 years ago

4.0.0

5 years ago

3.2.2

5 years ago

3.2.1

5 years ago

3.2.0

5 years ago

3.1.1

5 years ago

3.1.0

5 years ago

3.0.1

5 years ago

3.0.0

5 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago