$30 off During Our Annual Pro Sale. View Details »
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
61
es6 proxy overview
Joe Wang
April 26, 2018
Tweet
Share
More Decks by Joe Wang
See All by Joe Wang
fastbuild-前端资源打包平台架构与设计及其他
nodew
0
210
An Introduction to Reactive Programming based on RxJS
nodew
0
51
Lazy List With Generator and Iterator
nodew
1
720
ddd.pdf
nodew
0
200
An Introduction to Haskell
nodew
2
86
Other Decks in Programming
See All in Programming
開発に寄りそう自動テストの実現
goyoki
2
1k
Socio-Technical Evolution: Growing an Architecture and Its Organization for Fast Flow
cer
PRO
0
360
Microservices rules: What good looks like
cer
PRO
0
1.5k
chocoZAPサービス予約システムをNuxtで内製化した話
rizap_tech
0
160
これならできる!個人開発のすゝめ
tinykitten
PRO
0
110
ローターアクトEクラブ アメリカンナイト:川端 柚菜 氏(Japan O.K. ローターアクトEクラブ 会長):2720 Japan O.K. ロータリーEクラブ2025年12月1日卓話
2720japanoke
0
730
WebRTC、 綺麗に見るか滑らかに見るか
sublimer
1
190
TestingOsaka6_Ozono
o3
0
160
実は歴史的なアップデートだと思う AWS Interconnect - multicloud
maroon1st
0
210
Developing static sites with Ruby
okuramasafumi
0
310
GISエンジニアから見たLINKSデータ
nokonoko1203
0
120
複数人でのCLI/Infrastructure as Codeの暮らしを良くする
shmokmt
5
2.3k
Featured
See All Featured
The Pragmatic Product Professional
lauravandoore
37
7.1k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
Embracing the Ebb and Flow
colly
88
4.9k
It's Worth the Effort
3n
187
29k
A Tale of Four Properties
chriscoyier
162
23k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
196
70k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
37
2.6k
Optimizing for Happiness
mojombo
379
70k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Raft: Consensus for Rubyists
vanstee
141
7.2k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
7.9k
RailsConf 2023
tenderlove
30
1.3k
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