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
Understanding Recompose through examples
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Olena Sovyn
November 26, 2017
Programming
540
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Understanding Recompose through examples
Olena Sovyn
November 26, 2017
More Decks by Olena Sovyn
See All by Olena Sovyn
Hidden Gems in Code Reviews
kiwka
0
59
Testing, tEstIng, TeStInG or how to test React apps with generated input data
kiwka
1
700
Empowering your React application with Flow type system
kiwka
0
60
Building Webflow Ecommerce in 3 stories
kiwka
0
99
Building a Chrome Extension with React
kiwka
0
770
On the way to making React components more reusable
kiwka
2
330
Using Facade pattern with JSX
kiwka
4
430
Other Decks in Programming
See All in Programming
Hunting Vulnerabilities in Symfony with LLMs
vinceamstoutz
0
560
Datadog LLM Observabilityで実現する 安全なLLM Usage 管理
3150
0
110
ADKを使って簡単にAIエージェントを作ってみよう
k1mu21
0
280
LaravelLive Japan の裏方のすべて — 第188回 PHP勉強会@東京 (2026-06-24)
suguruooki
2
120
Mujeres en SEO Summit 2026 - Greatest Disaster Hits en Web Performance
guaca
0
200
Developing with AI Agents — Codex, Claude Code & Cowork Practical Guide
x5gtrn
PRO
0
1.3k
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
0
280
LLM本来の能力を解き放つサンドボックス技術とAI民主化への適用
yukukotani
3
4.5k
JavaDoc 再入門
nagise
1
420
PHPで使える日時の表現と、その知り方 #frontend_phpcon_do
o0h
PRO
0
260
正しくソフトウェアを作る、前提を疑うための認知の視点 / doubt-premise
minodriven
21
7k
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
610
Featured
See All Featured
Mind Mapping
helmedeiros
PRO
1
260
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.1k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
370
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
190
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Done Done
chrislema
186
16k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
620
Utilizing Notion as your number one productivity tool
mfonobong
4
330
Darren the Foodie - Storyboard
khoart
PRO
3
3.4k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.5k
KATA
mclloyd
PRO
35
15k
The browser strikes back
jonoalderson
0
1.3k
Transcript
Olena Sovyn (@frontendgirl) 6OEFSTUBOEJOH 3FDPNQPTFUISPVHI FYBNQMFT
Olena Sovyn (@frontendgirl) ! & "
❤ 3FBDU 3FEVY -PEBTI 3FBDU4UPSZCPPL GVODUJPOBMQSPHSBNNJOH
None
Olena Sovyn (@frontendgirl) 6OEFSTUBOEJOH 3FDPNQPTFUISPVHI FYBNQMFT
Image source: https://szenandoah.deviantart.com/art/Wonderland-Logo-252210579
None
ZFBSBHP
How to make complex component to be reusable
%BUB #FIBWJPVS 6* Reusable ???
)0$ (high order components)
)0$ changed: context or/and props
3FDPNQPTF
%BUB #FIBWJPVS 6* Recompose HOC Stateless component
None
Why should I care about Recompose
Image source: http://spacenews.com/spacexs-new-price-chart-illustrates-performance-cost-of-reusability/
None
Image source: https://whataboutjesus.com/jesus-is-the-only-way/
setDisplayName toClass lifecycle getContext withContext onlyUpdateForPropTypes onlyUpdateForKeys setStatic setPropTypes componentFromStream
setObservableConfig createEventHandlerWithConfig createEventHandler mapPropsStreamWithConfig mapPropsStream componentFromStreamWithConfig compose isClassComponent getDisplayName wrapDisplayName shallowEqual createSink componentFromProp nest hoistStatics mapProps withProps withHandlers withPropsOnChange renameProps defaultProps renameProp withState renderComponent renderNothing withReducer withStateHandlers shouldUpdate pure branch flattenProp
setDisplayName toClass lifecycle getContext withContext onlyUpdateForPropTypes onlyUpdateForKeys setStatic setPropTypes componentFromStream
setObservableConfig createEventHandlerWithConfig createEventHandler mapPropsStreamWithConfig mapPropsStream componentFromStreamWithConfig compose isClassComponent getDisplayName wrapDisplayName shallowEqual createSink componentFromProp nest hoistStatics mapProps withProps withHandlers withPropsOnChange renameProps defaultProps renameProp withState renderComponent renderNothing withReducer withStateHandlers shouldUpdate pure branch flattenProp
setDisplayName toClass lifecycle getContext withContext onlyUpdateForPropTypes onlyUpdateForKeys setStatic setPropTypes componentFromStream
setObservableConfig createEventHandlerWithConfig createEventHandler mapPropsStreamWithConfig mapPropsStream componentFromStreamWithConfig compose isClassComponent getDisplayName wrapDisplayName shallowEqual createSink componentFromProp nest hoistStatics mapProps withProps withHandlers withPropsOnChange renameProps defaultProps renameProp withState renderComponent renderNothing withReducer withStateHandlers shouldUpdate pure branch flattenProp
setDisplayName toClass lifecycle getContext withContext onlyUpdateForPropTypes onlyUpdateForKeys setStatic setPropTypes componentFromStream
setObservableConfig createEventHandlerWithConfig createEventHandler mapPropsStreamWithConfig mapPropsStream componentFromStreamWithConfig compose isClassComponent getDisplayName wrapDisplayName shallowEqual createSink componentFromProp nest hoistStatics mapProps withProps withHandlers withPropsOnChange renameProps defaultProps renameProp withState renderComponent renderNothing withReducer withStateHandlers shouldUpdate pure branch flattenProp
setDisplayName toClass lifecycle getContext withContext onlyUpdateForPropTypes onlyUpdateForKeys setStatic setPropTypes componentFromStream
setObservableConfig createEventHandlerWithConfig createEventHandler mapPropsStreamWithConfig mapPropsStream componentFromStreamWithConfig compose isClassComponent getDisplayName wrapDisplayName shallowEqual createSink componentFromProp nest hoistStatics mapProps withProps withHandlers withPropsOnChange renameProps defaultProps renameProp withState renderComponent renderNothing withReducer withStateHandlers shouldUpdate pure branch flattenProp
setDisplayName toClass lifecycle getContext withContext onlyUpdateForPropTypes onlyUpdateForKeys setStatic setPropTypes componentFromStream
setObservableConfig createEventHandlerWithConfig createEventHandler mapPropsStreamWithConfig mapPropsStream componentFromStreamWithConfig compose isClassComponent getDisplayName wrapDisplayName shallowEqual createSink componentFromProp nest hoistStatics mapProps withProps withHandlers withPropsOnChange renameProps defaultProps renameProp withState renderComponent renderNothing withReducer withStateHandlers shouldUpdate pure branch flattenProp
%VOOJOHr,SVHFSFGGFDU Confidence Wisdom first usage of one of Recompose HOCs
reading Recompose documentation trying to use Recompose on practice
None
setDisplayName toClass lifecycle getContext withContext onlyUpdateForPropTypes onlyUpdateForKeys setStatic setPropTypes componentFromStream
setObservableConfig createEventHandlerWithConfig createEventHandler mapPropsStreamWithConfig mapPropsStream componentFromStreamWithConfig compose isClassComponent getDisplayName wrapDisplayName shallowEqual createSink componentFromProp nest hoistStatics mapProps withProps withHandlers withPropsOnChange renameProps defaultProps renameProp withState renderComponent renderNothing withReducer withStateHandlers shouldUpdate pure branch flattenProp
None
None
None
branch lifecycle renderComponent renderNothing toClass mapProps withProps withPropsOnChange defaultProps renameProp
renameProps flattenProp withState withHandlers withStateHandlers withReducer shouldUpdate pure onlyUpdateForKeys onlyUpdateForPropTypes withContext getContext 1SPQT 4UBUF 1FSGPSNBODF 0UIFS $POUFYU 3FDPNQPTF )0$T
branch lifecycle renderComponent renderNothing toClass mapProps withProps withPropsOnChange defaultProps renameProp
renameProps flattenProp withState withHandlers withStateHandlers withReducer shouldUpdate pure onlyUpdateForKeys onlyUpdateForPropTypes withContext getContext 1SPQT 4UBUF 1FSGPSNBODF 0UIFS $POUFYU 3FDPNQPTF )0$T
None
None
None
None
None
None
None
https://www.youtube.com/watch?v=C_yj4k4QZVI
None
3FVTBCJMJUZ
MJGFDZDMF Image source: https://www.codevoila.com/post/57/reactjs-tutorial-react-component-lifecycle
None
None
None
None
None
None
None
UJNF &YBNQMFT
None
setDisplayName toClass lifecycle getContext withContext onlyUpdateForPropTypes onlyUpdateForKeys setStatic setPropTypes componentFromStream
setObservableConfig createEventHandlerWithConfig createEventHandler mapPropsStreamWithConfig mapPropsStream componentFromStreamWithConfig compose isClassComponent getDisplayName wrapDisplayName shallowEqual createSink componentFromProp nest hoistStatics mapProps withProps withHandlers withPropsOnChange renameProps defaultProps renameProp withState renderComponent renderNothing withReducer withStateHandlers shouldUpdate pure branch flattenProp
Any takeaways
Even if you are not directly contributing to libraries you
have still a lot to share
"XFTPNF 3FDPNQPTF
Make ideas clearly stand out in your examples, no matter
how complex they are
Useful Example Complex example Simple example
Even if something wasn’t clear from the first time there
is always another way
%KBOHP(JSMT,ZJW
None
Image source: https://hacks.mozilla.org/2017/11/entering-the-quantum-era-how-firefox-got-fast-again-and-where-its-going-to-get-faster/ -JO$MBSLXPSLT
Image source: https://twitter.com/kosamari/status/859958929484337152 $PEFEPPEMFTCZ.BSJLP,PTBLB
None
None
Code Example Input Output
None
None
Even if something wasn’t clear from the first time there
is always another way