IK
Interview Knowledge Book
Темы
Практика
Примеры
Песочница
EN
browser
Отслеживаемое обновление ref
Смоделируйте, как изменение ref пересчитывает зависимый computed в reactivity Vue.
index.js
let count = 0; function computed(getter) { return { get value() { return getter(); } }; } const doubled = computed(() => count * 2); count = 1; console.log('count', count); console.log('doubled', doubled.value);
Запустить
Остановить
Сбросить