Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

205
Vistas
React/redux notifications

I'm working on a react/redux project. I looking for a component or a package, that displays notification messages to the user, for example react-notify.

The components I've found (including react-notify) use refs:

<ReactNotify ref='notificator'/>

I want a package without refs, if one exists.

Thank you!

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

Look at redux-notifications. It's a pure redux solution without the use of refs. The documentation is a bit outdated, but this worked for me (the change is the actions).

You add the <Notifs /> component to the root of your project:

import { Provider }  from 'react-redux'
import { Notifs } from 'redux-notifications';

<Provider store={store}>
  <div>
    // ... other things like router ...
    <Notifs />
  </div>
</Provider>

Add the the notifReducer to your base reducer:

import { createStore, combineReducers } from 'redux'
import { reducer as notifReducer } from 'redux-notifications';
combineReducers({
  notifs: notifReducer,
  // ... more reducers here ...
})

And then use the built in actions to dispatch notifications:

import { actions } from 'redux-notifications';

action.notifSend({
    message: "I am a notification",
    kind,
    id: 1234,
    dismissAfter: 2000
})(dispatch)
over 4 years ago · Santiago Trujillo Denunciar

0

I have recently developed a simple library to implement a react-redux notification system on your app and it doesn't need to use ref. Check it out react-redux-notifications. Any feedback would be appreciate it.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda