Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

277
Views
¿Hay alguna diferencia funcional entre `Reflect.get()` y el acceso a la propiedad normal en un controlador `Proxy`?

El artículo de MDN sobre Proxy muestra dos formas de escribir controladores get() :

 const first = new Proxy(target, { get(target, property, receiver) { return target[property]; } }); const second = new Proxy(target, { get(target, property, receiver) { return Reflect.get(...arguments); } });

Por lo que he probado, ambos parecen funcionar como se esperaba para casos simples.

 const target = { foo: 42 }; const first = new Proxy(target, { get(target, property, receiver) { return target[property]; } }); const second = new Proxy(target, { get(target, property, receiver) { return Reflect.get(...arguments); } }); console.log(first.foo); console.log(second.foo);

¿Hay alguna diferencia funcional entre las dos opciones? ¿Existe una configuración en la que un enfoque funcione, pero el otro falle?

over 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Virtual assistant