Open mo-ib opened 6 years ago
Instead of passing message
, you can can pass a children prop:
const config = {
uid,
title: `${message}`,
position: 'br',
autoDismiss: 0,
dismissible: false,
children: (
<Message
exportJobId={exportJobId}
jobStatus={jobStatus}
uid={uid} />
),
}
dispatch(success(config))
This Message component can be connected to the value either with redux or context api.
Another alternative is that you could store the notification UID, close that and then open a new one.
I LOVE this library, very elegant. I want to use it beyond it's intended purpose as well, to display some bulk edit elements as I select them from a list. Is there a way to re-render the
message
prop so as I add elements, the message bosy updates? I'm trying something like this:and the
console.log
insidemakeMessage
is displaying the proper list, but obviously if I console log inside theBulkEdit
component, it remains at 1.