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 Context Api
Search
King Rayhan
August 17, 2019
Programming
0
30
React Context Api
King Rayhan
August 17, 2019
Tweet
Share
More Decks by King Rayhan
See All by King Rayhan
The weirdest part of JavaScript
kingrayhan
2
38
Other Decks in Programming
See All in Programming
Zero Waste, Radical Magic, and Italian Graft – Quarkus Efficiency Secrets
hollycummins
0
230
スクラムガイドのスプリントレトロスペクティブを改めて読みかえしてみた / Re-reading the Sprint Retrospective Section in the Scrum Guide
mackey0225
3
410
エンターテイメント業界で利用されるAWS
demuyan
0
210
Elm Form Validation
bkuhlmann
0
510
AWS Application Composerで始める、 サーバーレスなデータ基盤構築 / 20240406-jawsug-hokuriku-shinkansen
kasacchiful
1
260
Ruby Pattern Matching
bkuhlmann
0
920
スキーマ駆動開発による品質とスピードの両立 - 私達は何故、スキーマを書くのか
kentaroutakeda
0
170
Compose-View Interop in Practice (mDevCamp 2024)
stewemetal
0
120
Random\Randomizer クラスで日常のあれこれを解決しよう! / Random\Randomizer class solves familiar trouble
cocoeyes02
0
220
#phpcon_odawara オープン・クローズドなテストフィクスチャを求めて / open closed test fixtures
77web
3
230
MicrosoftのPlatform Engineeringガイドを読んで実際になにかやってみた
ymd65536
1
300
Tailwind CSSを本気でカスタマイズする方法
fsubal
13
5.2k
Featured
See All Featured
jQuery: Nuts, Bolts and Bling
dougneiner
59
7.1k
Music & Morning Musume
bryan
41
5.6k
Designing for humans not robots
tammielis
248
25k
Design by the Numbers
sachag
274
18k
Optimising Largest Contentful Paint
csswizardry
8
2.4k
BBQ
matthewcrist
80
8.8k
Large-scale JavaScript Application Architecture
addyosmani
504
110k
GraphQLとの向き合い方2022年版
quramy
32
12k
Designing Experiences People Love
moore
136
23k
Building Effective Engineering Teams - LeadDev
addyosmani
28
1.8k
The Cost Of JavaScript in 2023
addyosmani
16
3.9k
Visualization
eitanlees
136
14k
Transcript
Context API
[ … data and methods] Context <Header /> <TodoWritter />
<Todos /> <Filter /> Share data GLOBALLY
All components can access context values
Provider Component { !, ", ⚛ , $ } Anything
here can be accessible from any children component
functional Class
All components can access provider’s value prop
Access context via render props
Access context context Type Access context by this property Only
works on class component
By renderProps way we can access multiple context
Access context in functional component
We can access multiple context in functional component by useContext()
method