JSFiddle - React, Tailwind, and code Playground

by Maxim_Wolf

JavaScript

const real = {
a:1,
b:true,
};
const handler = {
  get:(target, prop, rec)=>{
    console.log({prop});
    return target[prop];
  }
}
const p = new Proxy(real, handler)
//console.log(real.a);
console.log(p.a);