One modal vs modals per record: does it really affect speed load and UX?

51 Views Asked by At

I'm currently working with a RoR Hotwire application and starting to wonder which approach is better to use in a modern SPA-like application. Let's consider a scenario where we have a table with X records, and the user has the ability to click the Delete button and confirm deletion using our custom modal form.

Which approach will be more effective?

  • Generate one modal for all records, with only one POST form and a 'record_id' field that is updated on each Delete button click using JS?
  • Generate modals for each record and easily use the DELETE form method?

I've tried both approaches, and currently, they are mixed in the app. Both show satisfactory results, but I'm attempting to find a silver bullet here and understand why some approaches are better.

0

There are 0 best solutions below