Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Hi Chris. I built a demo with LiveView a year ago and am very happy to see all the improvements.

One thing I didn't understand from the video is how the :post_updated callback worked. It prepends the updated post to the list of posts. How come that doesn't lead to the same post being double in the list?



Components IDs are unique. So once you try to render the same component, we know you simply want to update the current one.

The same happens on the client. If the server emits the same DOM ID, the client just updates it in place too.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: