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
47
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
630
ddd.pdf
nodew
0
190
An Introduction to Haskell
nodew
2
68
Other Decks in Programming
See All in Programming
카카오페이는 어떻게 수천만 결제를 처리할까? 우아한 결제 분산락 노하우
kakao
PRO
0
110
Jakarta EE meets AI
ivargrimstad
0
210
C++でシェーダを書く
fadis
6
4.1k
エンジニアとして関わる要件と仕様(公開用)
murabayashi
0
300
Quine, Polyglot, 良いコード
qnighy
4
650
Better Code Design in PHP
afilina
PRO
0
130
CSC509 Lecture 12
javiergs
PRO
0
160
シェーダーで魅せるMapLibreの動的ラスタータイル
satoshi7190
1
480
macOS でできる リアルタイム動画像処理
biacco42
9
2.4k
Nurturing OpenJDK distribution: Eclipse Temurin Success History and plan
ivargrimstad
0
950
Pinia Colada が実現するスマートな非同期処理
naokihaba
4
230
Webの技術スタックで マルチプラットフォームアプリ開発を可能にするElixirDesktopの紹介
thehaigo
2
1k
Featured
See All Featured
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Speed Design
sergeychernyshev
25
620
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
93
16k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
BBQ
matthewcrist
85
9.3k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.2k
A Modern Web Designer's Workflow
chriscoyier
693
190k
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
The Cost Of JavaScript in 2023
addyosmani
45
6.8k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
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