Skip to content

Bugfix: Make Store topic unique per LiveView

Compare
Choose a tag to compare
@PJUllrich PJUllrich released this 30 Jun 08:54
· 5 commits to master since this release

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 to live_ex_store_topic. This way, you can set a topic assign on your socket without overwriting the LiveEx internal topic assign.