Design Patterns · Middle · Question 48 of 75
Which pattern does the Proxy object in Vue 3 or MobX implement for reactivity?
- ✓Correct answer: Proxy + Observer: reads register a dependency, writes notify
- 2Builder: the proxy assembles new state from changes step by step
- 3Abstract Factory: the proxy creates families of reactive components
Explanation
The get trap remembers which effect or component read the property, and the set trap notifies subscribers of the change. This gives fine-grained reactivity without manual subscriptions. Signals are built on the same principle.