Agile Web Development with Rails 7: issues with Hotwire (pg. 161)

Hello,

I am here because I am having trouble with the Hotwire updating of the Depot app. In Chapter 11, Task F, we get instructions that should enable the updating of prices in one browser with updates coming from another. However, when I implement those changes, I don’t get the desired behavior. The original window’s prices remain unchanged until I refresh that window. Do you have any idea why it may be acting this way? I wanted to check it against the given code in depot_o, but when I got the same issue running that code.

Thanks for your help,
Ron Garduño

Well, I got it working for one part of the page. Now, as indicated in the text, the cart keeps the old price, but the catalog updates in real-time now. I don’t know how I missed the important “<%= turbo_frame_tag(dom_id(product)) do %>” part but I must have put it in the wrong place. Thanks folks!