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
Day5: Svelte 生命週期方法
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Kalan
September 14, 2020
Programming
120
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Day5: Svelte 生命週期方法
Svelte 元件當中有各式各樣的生命週期方法,可以在各個時間點呼叫達到不同功能。
Kalan
September 14, 2020
More Decks by Kalan
See All by Kalan
單頁式應用中的無障礙設計
kjj6198
0
830
選擇 Svelte 的三個理由 - JSDC
kjj6198
0
420
Svelte - 如何在前端框架中脫穎而出 | ModernWeb'21
kjj6198
0
230
状態管理を楽にする道
kjj6198
1
440
Day25. 如何解析 HTML 語法
kjj6198
0
190
Day24. Svelte 如何編譯程式碼(2)
kjj6198
0
230
Svelte 如何編譯程式碼(1)
kjj6198
0
250
Day22. Svelte 經驗談
kjj6198
0
220
Day18. UI 實戰篇 - 圖片檢視器
kjj6198
0
210
Other Decks in Programming
See All in Programming
JAWS-UG横浜 #102 AWSサ終供養LT会 成仏できない AWS サービスたち 〜本日、三体供養します〜
maroon1st
0
240
ソフトウェア設計に溶けるインフラ ― AWS CDK のインフラ認識論
konokenj
3
660
Generative UI & AI-Assistants for Your Angular Solutions
manfredsteyer
PRO
1
230
PostgreSQL 18で考えるUUID主キー
kazuhiro1982
0
420
2年かけて Deno に DOMMatrix を実装した話 / How I implemented DOMMatrix in Deno over two years
petamoriken
0
180
20260722_microCMSで考える、AI時代のコンテンツ運用設計
yosh1
0
120
型も通る、synthも通る、それでも危ない 〜AIのCDKの権限とコストを機械で検証する〜 / It Passes Type Checks, It Passes Synth Checks, but It’s Still Risky — Automatically Verifying Permissions and Costs in AI’s CDK —
seike460
PRO
1
440
関数型プログラミングのメリットって何だろう?
wanko_it
0
200
初めてのKubernetes 本番運用でハマった話
oku053
0
130
これからAgentCoreを触る方へトレンドはGatewayです
har1101
6
510
AI駆動開発を妨げる技術的負債の解消アプローチ / ai-refactoring-approach
minodriven
17
9.4k
AIエージェントで 変わるAndroid開発環境
takahirom
2
720
Featured
See All Featured
What's in a price? How to price your products and services
michaelherold
247
13k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
A better future with KSS
kneath
240
18k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
600
From π to Pie charts
rasagy
0
240
The Limits of Empathy - UXLibs8
cassininazir
1
550
Optimizing for Happiness
mojombo
378
71k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.9k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Visualization
eitanlees
152
17k
Exploring anti-patterns in Rails
aemeredith
3
450
We Are The Robots
honzajavorek
0
280
Transcript
第 12 屆 IT 鐵⼈賽 30 天從 0 到 1
學 Svelte Day5 - ⽣命週期⽅法
第 12 屆 IT 鐵⼈賽 本⽇⽬標 學習 Svelte 當中的⽣命週期⽅法
第 12 屆 IT 鐵⼈賽 ⽣命週期執⾏順序 初始化:beforeUpdate → onMount →
afterUpdate 元件更新:beforeUpdate → afterUpdate 元件銷毀:onDestroy
第 12 屆 IT 鐵⼈賽 ⽣命週期概覽 onMount, beforeUpdate, afterUpdate, onDestroy,
tick
第 12 屆 IT 鐵⼈賽 onMount 在 Svelte 元件掛載時呼叫 onMount
函數不會在 SSR 呼叫 如果有回傳函式,會在 unmount 時呼叫
第 12 屆 IT 鐵⼈賽 beforeUpdate 在狀態更新後,元件更新前執⾏ 會在 onMount 之前執⾏(初始化時)
第 12 屆 IT 鐵⼈賽 afterUpdate 狀態更新後,元件更新後執⾏
第 12 屆 IT 鐵⼈賽 onDestroy 元件銷毀時執⾏