Save 36% for Black Friday! Learn more

New Discussion

Notifications

You’re not receiving notifications from this thread.

Hotwire turbo stream update_or_[append/prepend] ?

1
Rails

Given a list of items that could be visible or not on a page (like a paginated list ), how is the best way to send from the server an update or append to that list? I Mean, update element when the item exists. If the element is not in view then append it.

  • I'm thinking of doing two calls: a turbo stream remove first and then turbo steam append.

Oh, I just realized that this was already solved in turbo, https://github.com/hotwired/turbo/pull/240

Join the discussion
Create an account Log in