LouisBarranqueiro/reapop has 1,561 GitHub stars and 74 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-07 04:58 UTC. Last push 2026-10-12.
:postbox: A simple and customizable React notifications system
Measured star growth
- in 24h
- 0
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalReapop
A simple and customizable React notifications system
Summary
Demo
Check out the demo.
Installation
npm install reapop --save
Usage
With React and Redux
- Add the notifications reducer to your Redux store.
import {combineReducers, createStore} from 'redux'
import {reducer as notificationsReducer} from 'reapop'
const rootReducer = combineReducers({
notifications: notificationsReducer(),
// ... your other reducers
})
const store = createStore(rootReducer)
- Add the
NotificationsSystemcomponent to your app. Place this component at the root of your application to avoid position conflicts.
import React from 'react'
import {useDispatch, useSelector} from 'react-redux'
import NotificationsSystem, {atalhoTheme, dismissNotification} from 'reapop'
const ATopLevelComponent = () => {
const dispatch = useDispatch();
// 1. Retrieve the notifications to display.
const notifications = useSelector((state) => state.notifications)
return (
<div>
<NotificationsSystem
// 2. Pass the notifications you want Reapop to display.
notifications={notifications}
// 3. Pass the function used to dismiss a notification.
dismissNotification={(id) => dispatch(dismissNotification(id))}
// 4. Pass a builtIn theme or a custom theme.
theme={atalhoTheme}
/>
</div>
)
}
- Set default notifications attributes
import {setUpNotifications} from 'reapop'
// run this function when your application starts before creating any notifications
setUpNotifications({
defaultProps: {
position: 'top-right',
dismissible: true
}
})
- Upsert or dismiss notification from any React components.
import React from 'react'
import {useDispatch} from 'react-redux'
// 1. Retrieve the action to create/update a notification, or any other actions.
import {notify} from 'reapop'
const AComponent = () => {
// 2. Retrieve the function to dispatch an action.
const dispatch = useDispatch()
useEffect(() => {
// 3. Create a notification.
dispatch(notify('Welcome to the documentation', 'info'))
}, [])
return (
...
)
}
- Upsert or dismiss notification from Redux actions.
// 1. Retrieve the action to create/update a notification.
import {notify} from 'reapop'
const sendResetPasswordLink = () => (dispatch) => {
axios.post('https://api.example.com/users/ask-reset-password')
// 2. Create a notification.
.then((resp) => dispatch(notify(resp.data.detail, 'success'))
.catch((resp) => dispatch(notify(resp.data.detail, 'error'))
}
}
With React alone
1 - Add the NotificationsProvider at the root of your application.
It is important that this component wraps all the components
where you want to access the notifications and the actions to manipule notifications.
import React from 'react'
import {NotificationsProvider} from 'reapop'
const ARootComponent = () => {
return (
<NotificationsProvider>
// ... components
</NotificationsProvider>
)
}
- Add the
NotificationsSystemcomponent to your app. Place this component at the root of your application to avoid position conflicts.
import React from 'react'
import NotificationsSystem, {atalhoTheme, useNotifications} from 'reapop'
const ATopLevelComponent = () => {
// 1. Retrieve the notifications to display, and the function used to dismiss a notification.
const {notifications, dismissNotification} = useNotifications()
return (
<div>
<NotificationsSystem
// 2. Pass the notifications you want Reapop to display.
notifications={notifications}
// 3. Pass the function used to dismiss a notification.
dismissNotification={(id) => dismissNotification(id)}
// 4. Pass a builtIn theme or a custom theme.
theme={atalhoTheme}
/>
</div>
)
}
- Set default notifications attributes
import {setUpNotifications} from 'reapop'
// run this function when your application starts before creating any notifications
setUpNotifications({
defaultProps: {
position: 'top-right',
dismissible: true
}
})
- Upsert or dismiss notification from any React components.
import React from 'react'
import {useNotifications} from 'reapop'
const AComponent = () => {
// 1. Retrieve the action to create/update a notification.
const {notify} = useNotifications()
useEffect(() => {
// 2. Create a notification.
notify('Welcome to the documentation', 'info')
}, [])
return (
...
)
}
Documentation
Read the documentation to learn more and see what you can with it.
License
Reapop is under MIT License
Explore related projects
freeCodeCamp/freeCodeCamp
freeCodeCamp.org's open-source codebase and curriculum. Learn math, programming, and computer science for free.
458,679 starsdonnemartin/system-design-primer
Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.
377,163 starsreact/react
The library for web and native user interfaces.
252,295 starsvuejs/vue
This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core
212,623 stars