Ever wondered how Vue.js handles reactivity? The answer is the Proxy API. It lets you ‘intercept’ object changes.
const data = { price: 100 };
const reactive = new Proxy(data, {
set(target, key, value) {
console.log(`${key} changed to ${value}!`);
target[key] = value;
return true;
}
});
