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
React18と2つのUX
Search
Reo Ishiyama
June 03, 2022
1.4k
4
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
React18と2つのUX
TECH STAND #8 React Native & Reactの登壇資料です。
https://standfm.connpass.com/event/248111/
Reo Ishiyama
June 03, 2022
More Decks by Reo Ishiyama
See All by Reo Ishiyama
データとコンポーネントの複雑さを整理整頓する
reo777
0
700
Featured
See All Featured
How to Ace a Technical Interview
jacobian
281
24k
BBQ
matthewcrist
89
10k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
69
65k
Amusing Abliteration
ianozsvald
1
290
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
320
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
440
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
290
How STYLIGHT went responsive
nonsquared
100
6.3k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
710
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.8k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3k
Code Reviewing Like a Champion
maltzj
528
40k
Transcript
スライドトップと してご利用ください マネーフォワード事業本部 山田 太郎 © Money Forward, Inc.
React18と2つのUX 個人事業主本部 プロダクト開発部 石山 怜生 © Money Forward, Inc.
クラウド確定申告 ReactとRailsを使って開発 野球熱上昇中 石山 怜生 個人事業主本部 プロダクト開発部 ©
Money Forward, Inc.
© Money Forward, Inc. お話しすること ・React18の(個人的)目玉機能とその周辺知識 ・ReactとUX
© Money Forward, Inc. お話しすること ・React18の(個人的)目玉機能とその周辺知識 ・ReactとUX
© Money Forward, Inc. React18と周辺知識 ・Suspense ・Streaming Server Rendering
・Selective Hydration ・Streaming HTML ・Automatic batching ・Transition
© Money Forward, Inc. React18と周辺知識 ・Suspense ・Streaming Server Rendering
・Selective Hydration ・Streaming HTML ・Automatic batching ・Transition
© Money Forward, Inc. Suspenseとは • Concurrent Renderingを有効にするReactが提供する機能・コンポーネント ◦ コンポーネントが準備を行っている間、表示する別のコンポーネントを指定で
きる
© Money Forward, Inc. Suspenseとは
© Money Forward, Inc. Suspenseが変えたこと • JSXの記述を「Viewに関するものだけ」にすることがもっと容易になる • ユーザーに対して少しでも早く「表示できるところから」表示させる
© Money Forward, Inc. CSR・SSR Client Side Rendering • クライアントで画面の描画・更新を行うためサクサク
• インターネット環境が悪かったり、バンドルサイズが大きくなると表示に時間がかかる Server Side Rendering * • JSの読み込みをしている間に、クライアントにページを先に返す • JSが読み込まれるまでに表示されるHTMLは触っても何も変化が起きない * SPAやReact界隈で言うところのSSR
© Money Forward, Inc. Hydration • SSRによって描画しているHTMLにイベントのアタッチを行う • これにより、アプリケーションがインタラクティブになる
© Money Forward, Inc.
© Money Forward, Inc.
© Money Forward, Inc.
© Money Forward, Inc. 1箇所読み込みが遅いと全体に影響が出る
© Money Forward, Inc. Streaming HTML • ユーザーに部分的に早くコンテンツを見せるようにする ◦ Streaming
SSRとも言われている
• 読み込みが終わったところから部分的にハイドレートを行えるようになった • 全体のハイドレートを待つ必要がなくなった • ユーザーのアクションによってハイドレートの順序が変わる © Money Forward, Inc.
Selective Hydration
© Money Forward, Inc. Selective Hydration
© Money Forward, Inc. Selective Hydration
© Money Forward, Inc. Selective Hydration
© Money Forward, Inc. Selective Hydration
© Money Forward, Inc. Selective Hydration
© Money Forward, Inc. React18と周辺知識 ・Suspense ・Streaming Server Rendering
・Selective Hydration ・Streaming HTML ・Automatic Batching ・Transition
© Money Forward, Inc. Batching • Reactが複数の状態更新をまとめてくれる機能
© Money Forward, Inc. Automatic Batching • 非同期処理・イベントハンドラーで状態を更新した時のレンダリングが1度だけにな る
© Money Forward, Inc. Automatic Batching
© Money Forward, Inc. Automatic Batching
© Money Forward, Inc. React18と周辺知識 ・Suspense ・Streaming Server Rendering
・Selective Hydration ・Streaming HTML ・Automatic Batching ・Transition
© Money Forward, Inc. • 「すぐに反映しなくてもいい」と伝える手段 Transition
© Money Forward, Inc. Transition
© Money Forward, Inc. Transition
© Money Forward, Inc. まとめ 分割によってUXを改善
© Money Forward, Inc. お話しすること ・React18の(個人的)目玉機能とその周辺知識 ・ReactとUX
© Money Forward, Inc. Reactから見た「ユーザー」とは?
© Money Forward, Inc. • アプリケーションを使う人 • 開発者
© Money Forward, Inc. 共通するものを提供している
© Money Forward, Inc. 直感的ユーザー体験
© Money Forward, Inc. 直感的ユーザー体験 • 開発者 → コードを読んだり書いたりする時に直感的に理解できる
• ユーザー → 操作をする時、直感的に扱うことができる
© Money Forward, Inc. 直感的ユーザー体験(ユーザー視点) これまで • どこか1箇所で重い処理があると全体への反映に時間がかかっていた React18
• ユーザーとアプリケーションの一体感が上がった ◦ データ取得開始からすぐにHTMLが表示される ◦ 重い処理を後回しにできる ◦ 興味のあるところから操作できるようになる
React18 • Suspenseにより不要になった © Money Forward, Inc. これまで • ローディングやエラーによる条件分岐が必要だった
ユーザー体験の改善(開発者視点)
Functional Component&Hooks ・状態・ロジックとビューの分離 © Money Forward, Inc. 過去から見るユーザー体験の改善(開発者視点) Class Component
・ライフサイクル、ロジック・状態とビューが共存しているため可読性が低い
React Hook Form ・Hooksベースで開発されている ・無駄なレンダリングを抑制している © Money Forward, Inc.
ReduxForm ・Reduxでフォームの値を管理する ・フォームの入力ごとにdispatchが走るので無駄が多い 過去から見るユーザー体験の改善(開発者視点)
© Money Forward, Inc. User Focus
© Money Forward, Inc.
© Money Forward, Inc.
None
© Money Forward, Inc. ユーザーフォーカスして良いプロダクトを提供する メンバー募集中です!!!!
ありがとうございました