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
ざっくりReact Fiberまとめ
Search
Yoshitaka Terazawa
April 13, 2018
Technology
0
250
ざっくりReact Fiberまとめ
Yoshitaka Terazawa
April 13, 2018
Tweet
Share
More Decks by Yoshitaka Terazawa
See All by Yoshitaka Terazawa
Introduction to React
locol23
0
43
Introduction to Scrum
locol23
0
270
Reactでリプレースして爆速になったのでちょっと仕組み公開
locol23
0
690
Other Decks in Technology
See All in Technology
熱々🔥のUDN🍜を喰らえ❗マルチテナントもVM統合も思いのまま❗新機能で切り拓くk8sネットワークの未来
tsukaman
0
140
事業と組織から目を逸らずに技術でリードする
ogugu9
19
5.5k
Design for Failure - リージョンとAZについて
yuki_ink
0
130
Cloudflare Use Cases at CADDi
minato128
2
300
Tailwind CSS の小話「コンテナークエリーって便利」
yamaday
0
160
計装を見直してアプリケーションパフォーマンスを改善させた話
donkomura
2
220
"発信文化"をどうやって計測する?技術広報のKPI探索記/How do we measure communication culture?
bitkey
4
370
WindowsでGenesisに挑戦した話
natsutan
0
130
え!! 日本国内でGo言語のバイリンガル勉強会を!?
logica0419
2
110
GitHub ActionsをTypeScriptで作ろう!
sansantech
PRO
2
110
技術選定を突き詰める 懇親会LT
okaru
2
1.3k
Ruby on Rails の楽しみ方
morihirok
6
3.2k
Featured
See All Featured
Fontdeck: Realign not Redesign
paulrobertlloyd
84
5.5k
Measuring & Analyzing Core Web Vitals
bluesmoon
7
430
Documentation Writing (for coders)
carmenintech
71
4.8k
The Cult of Friendly URLs
andyhume
78
6.4k
Designing for humans not robots
tammielis
253
25k
Scaling GitHub
holman
459
140k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
The Language of Interfaces
destraynor
158
25k
Faster Mobile Websites
deanohume
307
31k
KATA
mclloyd
29
14k
How to train your dragon (web standard)
notwaldorf
91
6k
Transcript
ざっくりReact Fiberまとめ
Fiberとは • Stackに変わる新しいReconciliation(リコンシリエーション)用の構造 • React v17よりデフォルトでFiberを使用した非同期のRenderingに変更 →Fiberを使用した非同期Renderingになることで、 ユーザのアクション(Inputへの入力など)を待たせないようになる
Reconsiliationとは • Virtual DOMの差分取得アルゴリズム • 差分取得結果をもとにHost(DOM等)に反映 ※HostとはブラウザであればDOM、 ネイティブであればReactNativeのビュー
StackとFiberの違い Stack(既存) Rootから順番に全て の子Componentを処 理後、renderingする 為、処理中にユーザ からアクセスがあっ た場合に対応できな い Fiber(v17〜)
class App extends React.Component { render(){ return( <Head /> <div>test</div> ) } } : Fiber Fiberの非同期 RenderingではFiber 単位で処理が実行さ れ、優先度によって Idle中の処理に回す などFlexibleに行わ れる為、ユーザを待 たせない
まとめ • renderingする裏側の構造の変更の為、実際に使用する側としては 意識する必要はあまりない • 非同期Renderingにより、ユーザを待たせないようになる
Appendix
Links • https://github.com/acdlite/react-fiber-architecture • http://blog.koba04.com/post/2017/04/25/a-state-of-react-fiber/ • https://qiita.com/seya/items/a655adb340af3b6690b5 • https://postd.cc/react-fiber-architecture/