Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
es6 proxy overview
Search
Joe Wang
April 26, 2018
Programming
1
49
es6 proxy overview
Joe Wang
April 26, 2018
Tweet
Share
More Decks by Joe Wang
See All by Joe Wang
fastbuild-前端资源打包平台架构与设计及其他
nodew
0
200
An Introduction to Reactive Programming based on RxJS
nodew
0
44
Lazy List With Generator and Iterator
nodew
1
670
ddd.pdf
nodew
0
190
An Introduction to Haskell
nodew
2
70
Other Decks in Programming
See All in Programming
データベースエンジニアの仕事を楽にする。PgAssistantの紹介
nnaka2992
9
4.5k
技術選定を未来に繋いで活用していく
sakito
3
100
Kubernetesで実現できるPlatform Engineering の現在地
nwiizo
3
1.9k
AWSで雰囲気でつくる! VRChatの写真変換ピタゴラスイッチ
anatofuz
0
140
State of Namespace
tagomoris
4
720
SwiftUI API Design Lessons
niw
1
260
これだけは知っておきたいクラス設計の基礎知識 version 2
masuda220
PRO
24
6k
Empowering Developers with HTML-Aware ERB Tooling @ RubyKaigi 2025, Matsuyama, Ehime
marcoroth
1
230
Coding Experience Cpp vs Csharp - meetup app osaka@9
harukasao
0
730
Deoptimization: How YJIT Speeds Up Ruby by Slowing Down / RubyKaigi 2025
k0kubun
0
480
php-fpm がリクエスト処理する仕組みを追う / Tracing-How-php-fpm-Handles-Requests
shin1x1
5
2.9k
趣味全開のAITuber開発
kokushin
0
190
Featured
See All Featured
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.3k
Adopting Sorbet at Scale
ufuk
76
9.3k
Designing for humans not robots
tammielis
252
25k
Building a Modern Day E-commerce SEO Strategy
aleyda
40
7.2k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Building Adaptive Systems
keathley
41
2.5k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
30
2k
How GitHub (no longer) Works
holman
314
140k
Faster Mobile Websites
deanohume
306
31k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.4k
How to Think Like a Performance Engineer
csswizardry
23
1.5k
GraphQLとの向き合い方2022年版
quramy
46
14k
Transcript
ES6 PROXY AN INTRODUCTION TO
OVERVIEW 1、WHAT IS PROXY 2、USE CASES 3、OBSERVABLE & IMMER.JS 4、DISCUSS
WHAT IS PROXY PROXY IS A DESIGN PATTERN
WHAT IS PROXY PROXY IN JAVASCRIPT The Proxy object is
used to define custom behavior for fundamental operations (e.g. property lookup, assignment, enumeration, function invocation, etc)
WHAT IS PROXY PROXY IN JAVASCRIPT handler.apply() handler.construct() handler.defineProperty() handler.deleteProperty()
handler.get() handler.getOwnPropertyDescriptor () handler.getPrototypeOf() handler.has() handler.isExtensible() handler.ownKeys() handler.preventExtensions() handler.set() handler.setPrototypeOf()
USE CASES BASIC USAGE
USE CASES SET DEFAULT PROPERTIES
USE CASES PRIVATE PROPS
USE CASES TRACK PROPS CHANGE
USE CASES SINGLETON
USE CASES PROP VALIDATORS
USE CASES COOKIE OBJECT HANDLER
USE CASES REVOCABLE PROXY
REAL WORLD PROJECT OBSERVABLE-UTIL ▸ https://github.com/nx-js/observer-util
REAL WORLD PROJECT OBSERVABLE-UTIL
REAL WORLD PROJECT IMMER ▸ https://github.com/mweststrate/immer
REAL WORLD PROJECT IMMER
SUMMARY PROS & CONS ▸ Expando property access ▸ Low
coupling ▸ Protect the original object ▸ Meta programming in a way ▸ Browser compatibility