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
52
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
46
Lazy List With Generator and Iterator
nodew
1
690
ddd.pdf
nodew
0
190
An Introduction to Haskell
nodew
2
75
Other Decks in Programming
See All in Programming
Webの外へ飛び出せ NativePHPが切り拓くPHPの未来
takuyakatsusa
2
570
猫と暮らす Google Nest Cam生活🐈 / WebRTC with Google Nest Cam
yutailang0119
0
160
PostgreSQLのRow Level SecurityをPHPのORMで扱う Eloquent vs Doctrine #phpcon #track2
77web
2
550
チームで開発し事業を加速するための"良い"設計の考え方 @ サポーターズCoLab 2025-07-08
agatan
1
450
MCPを使ってイベントソーシングのAIコーディングを効率化する / Streamlining Event Sourcing AI Coding with MCP
tomohisa
0
150
チームのテスト力を総合的に鍛えて品質、スピード、レジリエンスを共立させる/Testing approach that improves quality, speed, and resilience
goyoki
5
990
The Modern View Layer Rails Deserves: A Vision For 2025 And Beyond @ RailsConf 2025, Philadelphia, PA
marcoroth
2
640
PHP 8.4の新機能「プロパティフック」から学ぶオブジェクト指向設計とリスコフの置換原則
kentaroutakeda
2
990
イベントストーミング図からコードへの変換手順 / Procedure for Converting Event Storming Diagrams to Code
nrslib
2
930
生成AI時代のコンポーネントライブラリの作り方
touyou
1
250
Python型ヒント完全ガイド 初心者でも分かる、現代的で実践的な使い方
mickey_kubo
1
150
Android 16KBページサイズ対応をはじめからていねいに
mine2424
0
200
Featured
See All Featured
How to train your dragon (web standard)
notwaldorf
96
6.1k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
18
980
Become a Pro
speakerdeck
PRO
29
5.4k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.4k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.9k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.4k
The Straight Up "How To Draw Better" Workshop
denniskardys
235
140k
The Art of Programming - Codeland 2020
erikaheidi
54
13k
Docker and Python
trallard
44
3.5k
Agile that works and the tools we love
rasmusluckow
329
21k
Raft: Consensus for Rubyists
vanstee
140
7k
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