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
51
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
45
Lazy List With Generator and Iterator
nodew
1
680
ddd.pdf
nodew
0
190
An Introduction to Haskell
nodew
2
71
Other Decks in Programming
See All in Programming
ワンバイナリWebサービスのススメ
mackee
10
7.7k
Go Modules: From Basics to Beyond / Go Modulesの基本とその先へ
kuro_kurorrr
0
110
Perlで痩せる
yuukis
1
680
漸進。
ssssota
0
1.8k
Passkeys for Java Developers
ynojima
2
840
Prism.parseで 300本以上あるエンドポイントに 接続できる権限の一覧表を作ってみた
hatsu38
1
110
KotlinConf 2025 現地で感じたServer-Side Kotlin
n_takehata
1
200
Parallel::Pipesの紹介
skaji
2
910
実践ArchUnit ~実例による検証パターンの紹介~
ogiwarat
2
250
単体テストの始め方/作り方
toms74209200
0
430
Use Perl as Better Shell Script
karupanerura
0
690
インターフェース設計のコツとツボ
togishima
2
700
Featured
See All Featured
The Straight Up "How To Draw Better" Workshop
denniskardys
233
140k
For a Future-Friendly Web
brad_frost
179
9.8k
Statistics for Hackers
jakevdp
799
220k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
657
60k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
31
1.2k
The Power of CSS Pseudo Elements
geoffreycrofte
77
5.8k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
2.8k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
RailsConf 2023
tenderlove
30
1.1k
Product Roadmaps are Hard
iamctodd
PRO
53
11k
How to Think Like a Performance Engineer
csswizardry
24
1.7k
Into the Great Unknown - MozCon
thekraken
39
1.8k
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