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
locol
April 13, 2018
Technology
280
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ざっくりReact Fiberまとめ
locol
April 13, 2018
More Decks by locol
See All by locol
Which is the best option for linting: Pre-commit or CI?
locol23
1
450
Introduction to React
locol23
0
76
Introduction to Scrum
locol23
0
320
Reactでリプレースして爆速になったのでちょっと仕組み公開
locol23
0
790
Other Decks in Technology
See All in Technology
医療の現場を変革に挑戦した半年間の軌跡 - PythonとAIで現場を変える / From Code to Care
soudai
PRO
1
590
Eight Engineering Unit 紹介資料
sansan33
PRO
3
8.3k
猫付きpingコマンドを自作
uyuki234
0
300
【書籍出版記念】 10周回って、エージェント開発は RAGがすべてだった。〜RAGの歴史と開発現場で見えた実践知〜
akiratameto
20
7.1k
Data Hubグループ 紹介資料
sansan33
PRO
0
3.2k
名刺メーカーDevグループ 紹介資料
sansan33
PRO
0
1.2k
Knowledge Catalog を活用したメタデータ自動付与パイプライン構築
supership
0
130
ハッカソンで入賞した話 @ Findy LT
asari194617
0
1.5k
サイボウズ 開発本部採用ピッチ / Cybozu Engineer Recruit
cybozuinsideout
PRO
12
85k
型落ちシンクライアント端末のPoEモジュールを自作したかった話
logica0419
0
400
FDEの心得
noriakioji
5
6.4k
RelayerというPHPのフレームワークを作った
polidog
PRO
0
130
Featured
See All Featured
Paper Plane
katiecoart
PRO
2
53k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
210
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
250
How Software Deployment tools have changed in the past 20 years
geshan
1
34k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
240
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
390
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
440
Raft: Consensus for Rubyists
vanstee
141
7.6k
SEO for Brand Visibility & Recognition
aleyda
0
4.7k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.4k
Claude Code のすすめ
schroneko
67
230k
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/