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
550
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
60
Testing, tEstIng, TeStInG or how to test React apps with generated input data
kiwka
1
710
Empowering your React application with Flow type system
kiwka
0
60
Building Webflow Ecommerce in 3 stories
kiwka
0
100
Building a Chrome Extension with React
kiwka
0
770
On the way to making React components more reusable
kiwka
2
340
Using Facade pattern with JSX
kiwka
4
430
Other Decks in Programming
See All in Programming
ビデオ通話が繋がる0.2秒で何が起きているのか
supurazako
2
190
VibeCodingからAgenticWorkflowへ
starfish719
0
400
関東Kaggler会_NVIDIA_Nemotron_コンペ_振り返り
rick_ds
0
540
変わらないものが、変わるものを決める — 意図駆動開発 × イベントソーシング × イミュータブル | What Doesn't Change Decides What Can — IDD × Event Sourcing × Immutability
tomohisa
0
1.5k
ITヒヤリハットを整理してみた ~ライフサイクルと原因から考える再発防止策~
koukimiura
1
140
Cloudflare is Agents
chimame
0
160
ここ半年くらいでAIに作らせたR用ツール
eitsupi
0
370
Laravelで学ぶ Webアプリケーションチューニング入門/web_application_tuning_101
hanhan1978
4
1.7k
React本体のコードリーディング
high_g_engineer
1
140
メールのエイリアス機能を履き違えない
isshinfunada
0
230
生成AI導入の「期待外れ」を乗り越える ー 開発フロー改革が目指す、真の組織変革
starfish719
0
4.3k
プロポーザルを書いてもらう
pvcresin
0
430
Featured
See All Featured
Marketing to machines
jonoalderson
1
5.7k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
4.3k
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
160
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
64
56k
Testing 201, or: Great Expectations
jmmastey
46
8.2k
Leo the Paperboy
mayatellez
8
2.1k
[SF Ruby Conf 2025] Rails X
palkan
2
1.3k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
240
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
410
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
400
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
290
Color Theory Basics | Prateek | Gurzu
gurzu
0
410
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