Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Day5: Svelte 生命週期方法
Search
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
840
選擇 Svelte 的三個理由 - JSDC
kjj6198
0
440
Svelte - 如何在前端框架中脫穎而出 | ModernWeb'21
kjj6198
0
240
状態管理を楽にする道
kjj6198
1
450
Day25. 如何解析 HTML 語法
kjj6198
0
200
Day24. Svelte 如何編譯程式碼(2)
kjj6198
0
240
Svelte 如何編譯程式碼(1)
kjj6198
0
250
Day22. Svelte 經驗談
kjj6198
0
240
Day18. UI 實戰篇 - 圖片檢視器
kjj6198
0
220
Other Decks in Programming
See All in Programming
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
180
XP祭りでしか伝わらないフリップネタ #xpjug
murabayashi
0
150
AWS DevOps Agentで インシデント対応をAIに任せたい
honmarkhunt
7
3k
wkhtmltopdfの次どうするか問題2026
willnet
2
1.5k
AI に Inclusive UI を書かせよう — Design Rules Skill で Compose UI を作り直す
theoriatec2024
1
500
Vue Fes Japan 2026 タイムテーブル徹底解説
448jp
1
250
thread_parallel_with_free-threaded_Python_and_NumPy.pdf
riku_sakamoto
0
350
動作中のプログラムの中身をリアルタイムに覗く / Realtime Debugger for CSharp with Roslyn
prota
1
500
AI Agent時代のリアーキテクチャ戦略と実践
hokaccha
9
4.8k
App Storeの外へ──日本のiOSサイドローディング入門 for iOSDC Japan 2026
yuukiw00w
0
220
AIエージェント時代のコードレビューを設計する
nogu66
6
2.7k
Webの地図
yosuke_furukawa
PRO
6
4.6k
Featured
See All Featured
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
510
The untapped power of vector embeddings
frankvandijk
2
1.9k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
280
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
Ethics towards AI in product and experience design
skipperchong
2
380
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
260
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
530
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
300
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.6k
GraphQLとの向き合い方2022年版
quramy
50
15k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.9k
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 元件銷毀時執⾏