JavaScript Proxies

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ก.ค. 2021
  • JavaScript has Proxy Objects that were introduced between 2012 and 2016 depending on the browser. They are like enhanced getter and setter traps that you can define and control for any object.
    They can be useful for protecting and sealing object properties, for handling missing or misnamed properties and for doing validation on data.
    Code from video:
    gist.github.com/prof3ssorSt3v...
    MDN Proxy reference:
    developer.mozilla.org/en-US/d...

ความคิดเห็น • 26

  • @wilmercuevas6491
    @wilmercuevas6491 2 ปีที่แล้ว +5

    Nice, when I see this stuff I always try to imagine what kind of application would need this feature

  • @tahasoft1
    @tahasoft1 2 ปีที่แล้ว

    Thank you, Steve. Amazing. I've been waiting for this.

  • @kaypakaipa8559
    @kaypakaipa8559 2 ปีที่แล้ว

    Interesting, love the validation. Thanks again.

  • @ricardovaltierra8858
    @ricardovaltierra8858 2 ปีที่แล้ว

    Thank you for that great explanation. REALLY useful

  • @tech3425
    @tech3425 ปีที่แล้ว

    Never thought I'd need this feature. But here I am!

  • @fernandopiolimartinez5115
    @fernandopiolimartinez5115 2 ปีที่แล้ว

    Excellent!
    Best regards from Buenos Aires!

  • @tsevdos
    @tsevdos 2 ปีที่แล้ว

    Than you! Amazing video and explanation!!!

  • @Colstonewall
    @Colstonewall 2 ปีที่แล้ว

    Thank you, Steve.

  • @chhavimanichoubey9437
    @chhavimanichoubey9437 ปีที่แล้ว

    This video is really helpful tbh

  • @rmnkot
    @rmnkot 2 ปีที่แล้ว

    Top content, as usual!

  • @eliwhalen604
    @eliwhalen604 2 ปีที่แล้ว

    Super cool! Thank you!

  • @creatingwithcode1630
    @creatingwithcode1630 2 ปีที่แล้ว

    Thank you for this.

  • @LivvieLynn
    @LivvieLynn ปีที่แล้ว

    Looks like I have some refactoring to do. 😀

  • @user-hs1il2rd8c
    @user-hs1il2rd8c ปีที่แล้ว +1

    Great video. What is the benefit to using Reflect? Just the static methods that are defined on it? I notice its not a constructor so It looks like it only gives access to certain static methods. Is this all it does? And is it mainly used in accordance with Proxies? Ive never seen it used anywhere else. Thank you for this content. Learn something new about JS everyday.

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  ปีที่แล้ว

      Yeah. Generally used with Proxies as an easy way to access the object that is being passed to the proxy.

  • @4541047
    @4541047 2 ปีที่แล้ว +1

    Hi,
    can you share your vscode settings/theme?
    I want those equality three horizontal lines instead of the ugly look of '==='.
    Thanks :)

  • @_ademmeral
    @_ademmeral 8 หลายเดือนก่อน

    Sir, do you think to prepare a video/videos related to Stream API ?

  • @mykhailodmytriv7088
    @mykhailodmytriv7088 2 ปีที่แล้ว

    Please give me the name of the plugin that makes such beautiful array functions)

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  2 ปีที่แล้ว

      No plugins being used to create the Array.map function, just code complete with VS Code. I do have the Prettier extension that does some minor formatting of my code.

  • @MrLinuxFreak
    @MrLinuxFreak 6 หลายเดือนก่อน

    so its basicly an object middleware?

  • @r0x304
    @r0x304 2 ปีที่แล้ว

    first!

  • @alamir411
    @alamir411 ปีที่แล้ว

    Easy To understand , Thanks