
Security News
Deno 2.6 + Socket: Supply Chain Defense In Your CLI
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.
redux-notifications
Advanced tools
redux-notifications:warning: The previous package
re-notifhas been deprecated on NPM and renamed toredux-notifications. A list of changes can be found in the Changelog. Please update your applications accordingly.
React & Redux based notifications center.
Thanks to Redux, the notification objects are maintained within Redux Store's State and are fired by Actions.
npm install --save redux-notifications
redux-notifications reducer to Redux.import { createStore, combineReducers } from 'redux'
import { reducer as notifReducer } from 'redux-notifications';
combineReducers({
notifs: notifReducer,
// ... more reducers here ...
})
Notifs component at the root of your appimport { Provider } from 'react-redux'
import { Notifs } from 'redux-notifications';
<Provider store={store}>
<div>
// ... other things like router ...
<Notifs />
</div>
</Provider>
redux-notifications uses react-css-transition-group with the following classes:
To import the default stylesheet:
import 'redux-notifications/lib/styles.css';
Thanks to Redux, sending notification is simply done by firing an Action:
import { reducer as notifReducer, actions as notifActions, Notifs } from 'redux-notifications';
const { notifSend } = notifActions;
class Demo extends React.Component {
send() {
this.props.dispatch(notifSend({
message: 'hello world',
kind: 'info',
dismissAfter: 2000
}));
}
render() {
<button onClick={this.send}>Send Notification</button>
}
}
actions.notifSend({config})config.message : node [required]The notification message, can be one of:
string,integer,elementorarraycontaining these types.
config.kind : string [optional] [default:'info']The notification kind, can be one of:
info,success,warning,danger.
config.id : string [optional] [default:Date.now()]Set an ID for the notification. If not set, defaults to Date.now().
config.dismissAfter : integer [optional] [default:null]Auto dismiss the notification after the given number of milliseconds.
actions.notifClear()Clear all current notifications.
actions.notifDismiss(id)Dismiss a notification by ID
<Notifs CustomComponent={ReactComponent}/>CustomComponent : React componentA custom react component can be used instead of the default Notif component
className : string [optional] [default:null]Pass a custom classname to the component.
componentClassName : string [optional] [default:'notif']The base className for each Notif component. Can be used to override CSS styles.
transitionEnterTimeout : integer [optional] [default:600]Define the react-transition-group enter timeout is milliseconds.
transitionLeaveTimeout : integer [optional] [default:600]Define the react-transition-group leave timeout is milliseconds.
actionLabel : stringLabel for action click
onActionClick : funcFunction when action is clicked. Requires
actionLabelprop
git clone https://github.com/indexiatech/re-notif.git
cd re-notif
npm install
npm run start
Listening on localhost:9000
4.0.1 (June 27 2017)
FAQs
Redux & React based Notifications center
We found that redux-notifications demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.