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
バックエンドエンジニアが行うSvelte + Vite なフロントエンド構築
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
shiro seike
PRO
November 19, 2022
Technology
1.8k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
バックエンドエンジニアが行うSvelte + Vite なフロントエンド構築
shiro seike
PRO
November 19, 2022
More Decks by shiro seike
See All by shiro seike
型も通る、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
480
コミュニティの有益性 ~JAWS Days 2026 での体験を通して~ / The Benefits of a Community ~Through My Experience at JAWS Days 2026~
seike460
PRO
0
350
Architecture as SteeringOn-Ramp to AI-DLC
seike460
PRO
0
40
Why Continue AWS Community Builders
seike460
PRO
0
79
AWSコミュニティ活動は顧客のクラウド推進に効くのか / Do AWS community activities help customers adopt the cloud?
seike460
PRO
0
190
テレメトリーシグナルが導くパフォーマンス最適化 / Performance Optimization Driven by Telemetry Signals
seike460
PRO
2
300
AI-DLC 入門 〜AIコーディングの本質は「コード」ではなく「構造」〜 / Introduction to AI-DLC: The Essence of AI Coding Is Not “Code” but “Structure”
seike460
PRO
0
1.9k
今さら聞けないサーバーレスのいいところ 〜運用から解放される世界を目指して〜 / The Benefits of Serverless You Might Be Too Embarrassed to Ask About Now — Aiming for a World Free from Operational Burdens
seike460
PRO
0
110
AWS Lambda Durable Functions のユースケースを探る / Exploring Use Cases for AWS Lambda Durable Functions
seike460
PRO
0
100
Other Decks in Technology
See All in Technology
どこまでAIに任せるか 〜確率論と決定論の境界決定〜
shukob
0
560
なぜ、あなたのエージェントは言うことを聞かないのか
segavvy
1
580
それでも、技術なブログを書く理由 #kichijojipm / Why I Still Write Tech Blogs Even Now
shinkufencer
0
1.2k
データと地図で読む 大井町の「かわるもの、かわらないもの」
yoshiyama_hana
0
600
Claude Mythos、Fable...フロンティアAIの最新動向と企業のセキュリティ対策
flatt_security
0
170
全社でのソフトウェアサプライチェーン攻撃対策をやってみた with Takumi Guard
z63d
0
330
ここは地獄!つらい朝会を体験することで、チームとしてのより良い振る舞いに気づくワークショップ / The stand-up meeting from hell in the game industry
scrummasudar
0
440
基調講演:人とAIをつなぐIoTの今と未来 ー 「フィジカル」と「デジタル」が出会うその先へ【SORACOM Discovery 2026】
soracom
PRO
0
360
AIがAPIを書く時代に、私たちは何を設計すべきか
nagix
0
160
新たなDBアーキテクチャ「LTAP」にDeep Dive!!
inoutk
0
150
StepFunctionsとGraphRAGを活用した暗黙知活用のためのRAG基盤
yakumo
0
190
AIエージェントがあれば技術書なんてすぐ書けるでしょ→無理でした
watany
6
1.1k
Featured
See All Featured
What does AI have to do with Human Rights?
axbom
PRO
1
2.3k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.4k
Information Architects: The Missing Link in Design Systems
soysaucechin
0
1k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
470
From π to Pie charts
rasagy
0
240
Evolving SEO for Evolving Search Engines
ryanjones
0
250
Producing Creativity
orderedlist
PRO
348
40k
Prompt Engineering for Job Search
mfonobong
0
390
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Darren the Foodie - Storyboard
khoart
PRO
3
3.5k
Ethics towards AI in product and experience design
skipperchong
2
330
Transcript
バ ド ジ が Svelte + Vite ド 2022
2 0 22 . 11 . 19 @seike 4 60 1
@seike 460 - - @seike 46 0 - Fusic -
/ - / / - - PHP - PHP - PHPerKaigi - JAWS Days - AWS Dev Day 2
Agenda 1 .Svelte + Vite 2 .Svelte 3 .Svelte 4
.Vite 5 .Vite 6 . 3
01 Svelte + Vite
5
6
Svelte + Vite + Tailwind CSS 7
02 Svelte
Svelte JavaScript Vite Svelte Svelte Write less code No
virtual DOM DOM Truly reactive Hooks 9
Write less code - React 10 import React, { useState
} from 'react'; export default () => { const [a, setA] = useState( 1 ); const [b, setB] = useState( 2 ); function handleChangeA(event) { setA(+event.target.value); } function handleChangeB(event) { setB(+event.target.value); } return ( <div> <input type="number" value={a} onChange={handleChangeA}/> <input type="number" value={b} onChange={handleChangeB}/> <p>{a} + {b} = {a + b}</p> </div> ); }; UI React State Hook State State input State UI
Write less code - Svelte 11 <script> let a =
1 ; let b = 2 ; </script> <input type="number" bind:value={a}> <input type="number" bind:value={b}> <p>{a} + {b} = {a + b}</p> Svelte let State bind 築 [a] input p [a]
Write less code + Truly reactive 12 <script> let a
= 1 ; let b = 2 ; </script> <input type="number" bind:value={a}> <input type="number" bind:value={b}> <p>{a} + {b} = {a + b}</p> Svelte
TEMPLATE SYNTAX 13 {#if porridge.temperature > 1 00 } <p>too
hot!</p> {:else if 8 0 > porridge.temperature} <p>too cold!</p> {:else} <p>just right!</p> {/if} {#each items as item} <li>{item.name} x {item.qty}</li> {/each} {#await promise} <p>waiting for the promise to resolve...</p> {:then value} <p>The value is {value}</p> {:catch error} <p>Something went wrong: {error.message}</p> {/await} {#key value} <div transition:fade>{value}</div> {/key} {#if }... {:else if } {/if} {#each as name, index} ... {/each} {#await }... {:then name}... {:catch name} … {/await} {#key }... {/key}
Props Props export Props 14 Counter.svelte App.svelte
$: $: JS 15
Store 16
Store React Redux Vue Vuex Store writable Store
subscribe update set Store 17
Context API Svelte ContextAPI setContext getContext hasContext getAllContexts context
context 18 Counter.svelte App.svelte
Context API 19 Counter.svelte App.svelte
Component Hooks onMount DOM beforeUpdate state afterUpdate onDestroy tick state
resolve promise 20
No virtual DOM Virtual DOM Dom Virtual DOM
Svelte DOM 21
krausest React Vue Svelte 22 https://krausest.github.io/js-framework-benchmark/current.html
03 Svelte
👍 HTML CSS Javascript 🙏 $: 24
Made With Svelte Svelte Society Example 25
SvelteKit … 26
04 Vite
Vite HMR Rollup 28
ES Modules - Bundle - import export - ES
Modules - 29 https://vitejs.dev/guide/why.html#slow-server-start
vite.config.js Vite vite.config.js Production Staging loadEnv
.env Svelte Import.meta.env. prefix VITE_ 30 vite.config.js Svelte
05 Vite
👍 32
Svelte + Vite
34
06
36 Svelte UI Point 1 Example Point 2 Vite 頻
Point 3 Point 4
Thank You We are Hiring ! https://recruit.fusic.co.jp/