-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ReactNode
vs string
for message
#525
Comments
👋 @polewskm , sorry for the very late reply. Could you please share a concrete example of what you are trying to do? Why string or HTML string do not cover your needs?
It is not supported by default but you can adapt the library to create a notification ( |
Current use-case with
|
The purpose of this library is to propose a simple, yet powerful API but most importantly stable to add notifications to your application. A message as a string fulfills all the use cases this library is built for. I would suggest building your own custom Notification components and add extra properties to notifications to control/display customized information instead of attempting to store non-serializable (React elements) data in the state of React/Redux. What these custom notifications would display? In the example you shared, you can replace it with an HTML string but I guess you want to build something more complex with logic into it, right? |
@polewskm I'm closing this inactive issue. Please re-open it if needed. |
Description
Would it be possible for the
message
property to be of typeReactNode
vsstring
?Explanation / motivation
This would allow any React content to be displayed in the notification vs strings or strings with embedded HTML.
Additional information
The text was updated successfully, but these errors were encountered: