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
180
An Introduction to Reactive Programming based on RxJS
nodew
0
43
Lazy List With Generator and Iterator
nodew
1
600
ddd.pdf
nodew
0
180
An Introduction to Haskell
nodew
2
68
Other Decks in Programming
See All in Programming
あなたのアプリ、ログはでてますか?あるいはログをだしてますか? (Funabashi.dev用 軽量版)
uzulla
2
120
Method Swizzlingを行うライブラリにおけるマルチモジュール設計
yoshikma
0
120
Amazon Neptuneで始める初めてのグラフDB ー グラフDBを使う意味を考える ー
satoshi256kbyte
2
260
はじめてみよう量子プログラミング
itokoichi01
0
210
GraphQLの魅力を引き出すAndroidクライアント実装
morux2
3
680
Patched fetch did not work
quramy
4
390
connect-go で面倒くささと戦う / 2024-08-27 #newmo_layerx_go
izumin5210
2
650
GoのIteratorに詳しくなってしまう
inatonix
1
200
Android開発以外のAndroid開発経験の活かしどころ
konifar
2
1k
僕が思い描くTypeScriptの未来を勝手に先取りする
yukukotani
9
2.4k
o1モデルのプロンプトエンジニアリングって?
ktc_wada
0
270
サーバーレスで負荷試験!Step Functions + Lambdaを使ったk6の分散実行
shuntakahashi
6
1.6k
Featured
See All Featured
Gamification - CAS2011
davidbonilla
79
5k
4 Signs Your Business is Dying
shpigford
179
21k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
326
21k
Rebuilding a faster, lazier Slack
samanthasiow
78
8.6k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2k
Building a Modern Day E-commerce SEO Strategy
aleyda
36
6.8k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
24
610
Designing for humans not robots
tammielis
248
25k
Building Applications with DynamoDB
mza
90
6k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
354
29k
WebSockets: Embracing the real-time Web
robhawkes
59
7.3k
Learning to Love Humans: Emotional Interface Design
aarron
270
40k
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