Hard
Implementing Deep Reactive Object Tracking with JavaScript Proxies for Nested Properties
You're implementing a reactive system that needs to track object property access and modifications. Which implementation correctly handles nested objects and arrays?
1function createReactiveObject(target, handler) {2 // Missing implementation3 ____________________4 ____________________5 ____________________6 ____________________7}89// Usage:10const user = createReactiveObject({11 name: 'John',12 preferences: {13 theme: 'dark',14 notifications: ['email', 'push']15 }16}, {17 onGet(path, value) {18 console.log(`Accessing: ${path}`);19 },20 onSet(path, value) {21 console.log(`Updating: ${path} = ${value}`);22 }23});2425user.preferences.theme = 'light';26user.preferences.notifications.push('sms');