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
33
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
42
Other Decks in Programming
See All in Programming
Claude CodeによるAI駆動開発の実践 〜そこから見えてきたこれからのプログラミング〜
iriikeita
0
240
なぜあの開発者はDevRelに伴走し続けるのか / Why Does That Developer Keep Running Alongside DevRel?
nrslib
3
410
Cursorハンズオン実践!
eltociear
2
1.1k
Software Architecture
hschwentner
6
2.3k
バッチ処理を「状態の記録」から「事実の記録」へ
panda728
PRO
0
160
Six and a half ridiculous things to do with Quarkus
hollycummins
0
170
AI Coding Meetup #3 - 導入セッション / ai-coding-meetup-3
izumin5210
0
3.3k
TFLintカスタムプラグインで始める Terraformコード品質管理
bells17
2
170
20251016_Rails News ~Rails 8.1の足音を聴く~
morimorihoge
1
350
私はどうやって技術力を上げたのか
yusukebe
43
18k
CSC509 Lecture 04
javiergs
PRO
0
300
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
120
Featured
See All Featured
Leading Effective Engineering Teams in the AI Era
addyosmani
5
430
Thoughts on Productivity
jonyablonski
70
4.9k
KATA
mclloyd
32
15k
Keith and Marios Guide to Fast Websites
keithpitt
411
23k
Become a Pro
speakerdeck
PRO
29
5.5k
A Tale of Four Properties
chriscoyier
161
23k
Into the Great Unknown - MozCon
thekraken
40
2.1k
Why You Should Never Use an ORM
jnunemaker
PRO
59
9.6k
Bash Introduction
62gerente
615
210k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
45
2.5k
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
Rails Girls Zürich Keynote
gr2m
95
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