edisonywh / backoffice

Admin tool built with the PETAL stack
MIT License
217 stars 15 forks source link

What's the impact of having two LiveView on the same page? #28

Open edisonywh opened 3 years ago

edisonywh commented 3 years ago

I came across an issue where I include my app's app.js in Backoffice, which sets up LiveSocket, but the problem is Backoffice already sets up an instance of LiveSocket. I didn't dive too much into what the implications are but from what I saw it was causing handle_event being fired twice.

We need to further investigate this and document it, perhaps suggesting a workaround.

This also tie into how we allow users to supply user defined Hooks to our Backoffice LiveSocket