Subscribing to specific prop changes in Surface component


Is there a way to easily handle custom event when specified prop changes. I want to send event to JS component from Phoenix when specified property of Surface non-Live Component changes.

I think you need to implement a clause in the update/2 function, and compare the value in assigns with the one in socket.assigns to see that it changed and then send event to JS…

1 Like

Okay, I will do so, thanks for reply!