Bugfix: Make Store topic unique per LiveView
Fixes
Previously, the store PubSub topic
was hard-coded to always be live_ex_store
. This meant that if multiple LiveViews initialised the store, they would overwrite each others state since all state updates from all LiveViews were broadcasted on the same topic. This is now fixed by extending the live_ex_store_topic
with the PID
of the LiveView. This way, the store topic will always be unique per LiveView.
Breaking Changes
- The
topic
-option was renamed tolive_ex_store_topic
. This way, you can set atopic
assign on your socket without overwriting theLiveEx
internaltopic
assign.