❗️Bug Fixes
- MagicDrawer now handles touch events correctly on Android devices
- We (hopefully) reduced the risk of memory leaks in SSR apps
This is quite an expansive update, partly because we are discovered the risk of memory leaks with a certain pattern implemented in various plugins. Instead of saving state to a ref that ran the risk of being exposed as a singleton, we now attach plugin state to the app instance, where it will be discarded automatically.
We have also implemented more thorough clean ups for various event listeners, watchers, intersection observers, etc.
⚠️ Breaking Changes
useMagicEmitter() and other useMagic… composables must now be initialised outside the scope of a function.
Before:
function example() {
useMagicEmitter().on('*', callback)
}After:
const emitter = useMagicEmitter()
function example() {
emitter.on('*', callback)