🚀🚀
{computed} from vue это брейкингSize: a a a
🚀🚀
{computed} from vue это брейкинг🚀🚀
P
import {computed} from ‘unpkg.com/vue@3’🚀🚀
P
🚀🚀
P
P
P
🚀🚀
P
🚀🚀
🚀🚀
🚀🚀
P
🚀🚀
P
import { ref } from '@vue/reactivity'
export function useStore(store) { ... }
И ничего не сломается ни у кого )🚀🚀
import { ref } from '@vue/reactivity'
export function useStore(store) { ... }
И ничего не сломается ни у кого )P
import { shallowRef } from '@vue/reactivity'
export function useStore(store) {
const stateRef = shallowRef(store.getState())
const unwatch = store.updates.watch(newState => { stateRef.value = newState })
return { stateRef, unwatch }
}