schiehll / react-alert

alerts for React
MIT License
607 stars 99 forks source link

Abillity to control alert ID #96

Closed anthonyraymond closed 5 years ago

anthonyraymond commented 5 years ago

This modifications allow to create alerts with a specific id. Also i slighly changed the remove method to be able to remove an alert with just a mocked object like remove({id: xxx}).

This allow to create event triggered alerts (could also be done before this PR), but it's now much more redux compliant, cause you can create alert IDs in redux reducers and pop them up based on the global app state.

schiehll commented 5 years ago

You can already do it using the return of the show/success/error/info function.

anthonyraymond commented 5 years ago

The way described above does not allows me to use rhe return function