DEV Community

Discussion on: Using Hotwire and Rails to build a live commenting system

Collapse
 
superails profile image
Yaroslav Shmarov

Works well and very well written. Looking forward to more, David!

That's where you really see HTML flying over the wire!
img

[ActionCable] Broadcasting to Z2lkOi8vaG90d2lyZS1jb21tZW50cy9Qcm9qZWN0LzE:comments: "<turbo-stream action=\"prepend\" target=\"project_1_comments\"><template><div id=\"comment_39\">\n  2021-09-12 22:40:47 UTC\n  <strong>\n    eweew\n  </strong>\n</div></template></turbo-stream>"
  Rendered comments/_form.html.erb (Duration: 1.5ms | Allocations: 366)
Turbo::StreamsChannel transmitting "<turbo-stream action=\"prepend\" target=\"project_1_comments\"><template><div id=\"comment_39\">\n  2021-09-12 22:40:47 UTC\n  <strong>\n    eweew\n  </strong>\n</div></template></turbo-stream>" (via streamed from Z2lkOi8vaG90d2lyZS1jb21tZW50cy9Qcm9qZWN0LzE:comments)
Enter fullscreen mode Exit fullscreen mode
Collapse
 
davidcolbyatx profile image
David Colby

Thanks Yaroslav, thanks for the feedback, glad you enjoyed it!

Hard to get much faster than 1.5ms, even in a local environment :)