DEV Community

Discussion on: Flash messages with Hotwire

Collapse
 
bdavidxyz profile image
David Boureau

My humble opinion : your solution is very ok, and stick to the Rails Way. However I find it very complicated. Simply display a message to the user should be completely straightforward. There's already a flash message in Rails for this ! Thus, the flash message should be displayed, no matter the technical stack behind it. Note it is already the case for the error scenario. Turbo is able to render an error flash message. But not a successful one ! I understand that "TurboDrive" is meant to navigate, and "TurboFrame" for inline edition, but honestly it shouldn't be so painful to simply render a message about the last action.