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
SolidでLeacTion!をリプレイスしてみた!
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
issei1213
October 21, 2023
1
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
SolidでLeacTion!をリプレイスしてみた!
issei1213
October 21, 2023
More Decks by issei1213
See All by issei1213
AI時代の理解アプローチ
issei_miura
0
0
Compound Pattern紹介
issei_miura
0
1
コンポーネントテストの戦略について
issei_miura
0
0
Featured
See All Featured
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
780
Test your architecture with Archunit
thirion
2
2.4k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
480
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
500
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
68
59k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
The Spectacular Lies of Maps
axbom
PRO
1
1.1k
Into the Great Unknown - MozCon
thekraken
41
2.8k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
310
GraphQLとの向き合い方2022年版
quramy
50
15k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
2
2.9k
Being A Developer After 40
akosma
92
590k
Transcript
SolidでLeacTion!をリプレイスしてみた! いっちる
About me 名前:いっちる(三浦 壱生) 所属会社:合同会社ノマドリ 技術スタック:React / Vue.js / TypeScript
好きな言語:TypeScript
概要 • なぜこのタイトルを話そうと思ったのか • Solidについて • Solidのメリット・デメリット • SolidのStateについて •
感想
なぜこのタイトルを話そうとおもっ たのか • 現在LeacTion(LT用コメント投稿ツール)のVue3→Solidへの移行 をしている(桑畑さんと一緒に)。Vue3とは書き方が大きく変わり、学 びがあったため • Solidの採用理由として、技術動向の流れが確認できる「The State of
2021」の満足度部門でランキング1位だったため。トレンドの技 術に触れてみたいという思いで採用に至った。
The State of 2021 URL: https://2021.stateofjs.com/en-US/libraries/front-end-frameworks/#front_end_frameworks_experience_ranking
Solidについて • • • 宣言的型のJavaScriptフレームワーク 仮想DOMを用いない 。直接DOMを更新することで、UIを表示す る(同様のフレームワークにSvelteがある) Reactライクで記載できる
Solidメリット • 直接DOM操作によるレンダリングで高いパフォーマンス が発揮できる • Reactと違ってコンポーネントが一回しかレンダリングさ れない。(ReactはローカルStateが更新されると親子コン ポーネントがレンダリングされる ) リアクティブな値が更新された時に、部分的にレンダリン
グされる • JSXを採用しているため、 Reactを使った人があるなら親 しみやすい。見た目は Reactにみえる。
Solidのデメリット(個人的に感じた) • 日本語の技術記事が少ない。 • リアクティブな値が変更されない時のデバッグがつらい ◦ ある程度はeslintが指摘してくれる
SolidのLocalState管理
SolidのGlobalState管理
VueとSolidのメソッド比較 Vue Solid LocalState Vue2: data Vue3: ref, reactive createSignal
createStore GlobalState Vuex / Pinia Provide・Inject createSignal createStore memo computed createMemo ライフサイクル Vue2: beforeMount, mounted … Vue3: onBeforeMount, onMounted … onMount / onCleanup
感想 • Reactはメモ化(memo, useCallback)など考慮しないといけなかったが、 Solidはコンポーネントが一度しか読み込まれないのでこの値は楽になっ た。 • ただ、createSignal, createStoreなどの更新をする時のパフォーマンスは意 識すると複雑だったりするので、ドキュメントをしっかり読み込む必要はあり
そう • ライブラリのスター数が全体的に少ないため、技術選定に迷う