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
190
An Introduction to Reactive Programming based on RxJS
nodew
0
43
Lazy List With Generator and Iterator
nodew
1
650
ddd.pdf
nodew
0
190
An Introduction to Haskell
nodew
2
69
Other Decks in Programming
See All in Programming
週次リリースを実現するための グローバルアプリ開発
tera_ny
1
1.2k
LLM Supervised Fine-tuningの理論と実践
datanalyticslabo
8
1.9k
Beyond ORM
77web
11
1.6k
良いユニットテストを書こう
mototakatsu
11
3.6k
ドメインイベント増えすぎ問題
h0r15h0
2
560
HTML/CSS超絶浅い説明
yuki0329
0
190
shadcn/uiを使ってReactでの開発を加速させよう!
lef237
0
300
PHPUnitしか使ってこなかった 一般PHPerがPestに乗り換えた実録
mashirou1234
0
420
毎日13時間もかかるバッチ処理をたった3日で60%短縮するためにやったこと
sho_ssk_
1
550
Асинхронность неизбежна: как мы проектировали сервис уведомлений
lamodatech
0
1.3k
知られざるDMMデータエンジニアの生態 〜かつてツチノコと呼ばれし者〜
takaha4k
1
420
ISUCON14感想戦で85万点まで頑張ってみた
ponyo877
1
590
Featured
See All Featured
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
The Invisible Side of Design
smashingmag
299
50k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
28
2.2k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.1k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
113
50k
Designing for humans not robots
tammielis
250
25k
Why Our Code Smells
bkeepers
PRO
335
57k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
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