2 ms·
> I guess that's the magic behind most JS data binding libraries? Most of the functions on Reflect can be done using built-in language features, I haven’t seen
by jitl 5y ago
> I guess that's the magic behind most JS data binding libraries?
Most of the functions on Reflect can be done using built-in language features, I haven’t seen much use of it in libraries.
For reactive, magic data binding see Proxy, which allows a callback on object property access for arbitrary objects. Proxy is the magic behind Mobx for instance. Reflect fits in well because it can be used as the “default” or fallback implementation for Proxy methods. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...