Hello!
I am facing an issue with JS hooks when there are multiple live components on the same live view.
More specifically:
- I have one live view that contains two live components
- each component is connected to a JS hook
- each JS hook subscribes to a
ping
event usinghandleEvent
- on
update/2
each live component sends aping
event to its hook usingpush_event
The problem is that both hooks receive one ping
event that is sent from the second component only; the first component’s event never reaches the client.
I have set up a minimal example that demonstrates this problem in this repo.
Any insight on this behaviour? Am I doing something wrong?