Major use cases for ES6 proxies

后端 未结 4 1385
死守一世寂寞
死守一世寂寞 2021-01-12 01:07

I recently got to know about ES6 proxies but I don\'t see a good reason to use it. I mean, everything that one could do with Proxy can be done without it, except if I\'m mis

4条回答
  •  误落风尘
    2021-01-12 01:37

    There is actually lots you can do with it. Theres an awesome github repo where this guy put together a bunch of proxy resources which you can check out.

    https://github.com/mikaelbr/proxy-fun

    Also, check out my gists, I recently started playing around with proxies, and I have a couple examples that are pretty unique. You can essentially build your own DSL using proxy and program in a closer fashion to the way you think.

    https://gist.github.com/jasuperior

提交回复
热议问题