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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Joe Wang
April 26, 2018
Programming
77
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
es6 proxy overview
Joe Wang
April 26, 2018
More Decks by Joe Wang
See All by Joe Wang
fastbuild-前端资源打包平台架构与设计及其他
nodew
0
230
An Introduction to Reactive Programming based on RxJS
nodew
0
62
Lazy List With Generator and Iterator
nodew
1
760
ddd.pdf
nodew
0
230
An Introduction to Haskell
nodew
2
95
Other Decks in Programming
See All in Programming
メールのエイリアス機能を履き違えない
isshinfunada
0
240
わからない話を追いかけたら、プログラミング言語を作る側にいた
ydah
3
510
2年かけて Deno に DOMMatrix を実装した話 / How I implemented DOMMatrix in Deno over two years
petamoriken
0
210
数百円から始めるRuby電子工作
tarosay
0
160
Google Apps Script で Ruby を動かす
kawahara
0
240
仕様駆動開発へのトライを機に チームに適合する手法を模索し続けている話
freee
PRO
0
520
Cloudflare is Agents
chimame
0
170
20260722_microCMSで考える、AI時代のコンテンツ運用設計
yosh1
0
410
改善しないと、タスクが回らない。 “てんこ盛りポジション” を引き継いだ情シスの、入社3ヶ月の業務改善録
krm963
0
270
今さら聞けない .NET CLI
htkym
0
190
PHP初心者セッション2026 〜生成AIでは見えない裏側を知る:今だからLAMPを通して仕組みを学ぶ〜
kashioka
0
930
全PRの83%がAIレビューだけでマージできるようになった開発組織はその後どうなったか
athug
1
1.7k
Featured
See All Featured
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
380
Site-Speed That Sticks
csswizardry
13
1.4k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.8k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
300
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.2k
Being A Developer After 40
akosma
91
590k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Code Reviewing Like a Champion
maltzj
528
40k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.4k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
64
56k
エンジニアに許された特別な時間の終わり
watany
108
250k
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