Erlang/OTP 24 [erts-12.3.2.10] [source] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:1] [jit]
Interactive Elixir (1.14.5) - press Ctrl+C to exit (type h() ENTER for help)
{:phoenix, "~> 1.7.11"},
{:phoenix_live_view, "~> 0.20.3"},
I have a liveview process that subscribes to a channel. There is a button on that LV page which when clicked spawns a genserver (via dynamic supervisor). The genserver then broadcasts a msg back to the LV process.
Initially, when I click on the button the LV process receives single broadcast. If I click on the b utton again, I receive two broadcasts. Then if I click again, I receive 3 broadcasts.
I would love to solve this but I am not sure where to look at. I replicated this in a fresh new phoenix project.
this is the repo with the bug.
go to localhost:4000/users and u will see a buttn with Click me