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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Joe Wang
April 26, 2018
Programming
68
1
Share
es6 proxy overview
Joe Wang
April 26, 2018
More Decks by Joe Wang
See All by Joe Wang
fastbuild-前端资源打包平台架构与设计及其他
nodew
0
220
An Introduction to Reactive Programming based on RxJS
nodew
0
55
Lazy List With Generator and Iterator
nodew
1
750
ddd.pdf
nodew
0
220
An Introduction to Haskell
nodew
2
93
Other Decks in Programming
See All in Programming
AI-DLC Deep Dive
yuukiyo
9
4.2k
ハンズオンで学ぶクラウドネイティブ
tatsukiminami
0
130
Offline should be the norm: building local-first apps with CRDTs & Kotlin Multiplatform
renaudmathieu
0
220
事業会社でのセキュリティ長期インターンについて
masachikaura
0
250
実践CRDT
tamadeveloper
0
570
レガシーPHP転生 〜父がドメインエキスパートだったのでDDD+Claude Codeでチート開発します〜
panda_program
0
970
第3木曜LT会 #28
tinykitten
PRO
0
110
SkillがSkillを生む:QA観点出しを自動化した
sontixyou
6
3.4k
〜バイブコーディングを超えて〜 チームで実験し続けたAI駆動開発
tigertora7571
0
110
Xdebug と IDE による デバッグ実行の仕組みを見る / Exploring-How-Debugging-Works-with-Xdebug-and-an-IDE
shin1x1
0
380
Alternatives to JPA 2026
debop
0
110
How We Benchmarked Quarkus: Patterns and anti-patterns
hollycummins
1
140
Featured
See All Featured
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
270
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
130
Why Our Code Smells
bkeepers
PRO
340
58k
Evolving SEO for Evolving Search Engines
ryanjones
0
180
Art, The Web, and Tiny UX
lynnandtonic
304
21k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.2k
Statistics for Hackers
jakevdp
799
230k
Embracing the Ebb and Flow
colly
88
5k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
730
WCS-LA-2024
lcolladotor
0
540
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.9k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.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