this post was submitted on 11 Sep 2023
11 points (86.7% liked)
React
907 readers
1 users here now
A community for discussing anything related to the React UI framework and it's ecosystem.
Wormhole
Icon base by Skoll under CC BY 3.0 with modifications to add a gradient
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Personally I use controlled, I typically create my own custom components that wrap a Dialog compoenent. These custom components will have props for thing such as the message to display, title, whether to show it or not, and an onClose callback. The onClose callback will be emitted from the custom component, which you can code to get called regardless of what method the user uses to close the dialog, then the parent component would simply toggle the boolean state of the custom dialog.