Slide 1

Slide 1 text

Olena Sovyn (@frontendgirl) 6OEFSTUBOEJOH 3FDPNQPTFUISPVHI FYBNQMFT

Slide 2

Slide 2 text

Olena Sovyn (@frontendgirl) ! & "

Slide 3

Slide 3 text

❤ 3FBDU
 3FEVY -PEBTI 3FBDU4UPSZCPPL GVODUJPOBMQSPHSBNNJOH

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

Olena Sovyn (@frontendgirl) 6OEFSTUBOEJOH 3FDPNQPTFUISPVHI FYBNQMFT

Slide 6

Slide 6 text

Image source: https://szenandoah.deviantart.com/art/Wonderland-Logo-252210579

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

ZFBSBHP

Slide 9

Slide 9 text

How to make complex component to be reusable

Slide 10

Slide 10 text

%BUB #FIBWJPVS 6* Reusable ???

Slide 11

Slide 11 text

)0$ (high order components)

Slide 12

Slide 12 text

)0$ changed: context or/and props

Slide 13

Slide 13 text

3FDPNQPTF

Slide 14

Slide 14 text

%BUB #FIBWJPVS 6* Recompose HOC Stateless component

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

Why should I care about Recompose

Slide 17

Slide 17 text

Image source: http://spacenews.com/spacexs-new-price-chart-illustrates-performance-cost-of-reusability/

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

Image source: https://whataboutjesus.com/jesus-is-the-only-way/

Slide 20

Slide 20 text

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

Slide 21

Slide 21 text

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

Slide 22

Slide 22 text

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

Slide 23

Slide 23 text

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

Slide 24

Slide 24 text

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

Slide 25

Slide 25 text

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

Slide 26

Slide 26 text

%VOOJOHr,SVHFSFGGFDU Confidence Wisdom first usage of one of Recompose HOCs reading Recompose
 documentation trying to use Recompose on practice

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

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

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

No content

Slide 32

Slide 32 text

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

Slide 33

Slide 33 text

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

Slide 34

Slide 34 text

No content

Slide 35

Slide 35 text

No content

Slide 36

Slide 36 text

No content

Slide 37

Slide 37 text

No content

Slide 38

Slide 38 text

No content

Slide 39

Slide 39 text

No content

Slide 40

Slide 40 text

No content

Slide 41

Slide 41 text



Slide 42

Slide 42 text

https://www.youtube.com/watch?v=C_yj4k4QZVI

Slide 43

Slide 43 text

No content

Slide 44

Slide 44 text

3FVTBCJMJUZ

Slide 45

Slide 45 text

MJGFDZDMF Image source: https://www.codevoila.com/post/57/reactjs-tutorial-react-component-lifecycle

Slide 46

Slide 46 text

No content

Slide 47

Slide 47 text

No content

Slide 48

Slide 48 text

No content

Slide 49

Slide 49 text

No content

Slide 50

Slide 50 text

No content

Slide 51

Slide 51 text

No content

Slide 52

Slide 52 text

No content

Slide 53

Slide 53 text

UJNF &YBNQMFT

Slide 54

Slide 54 text

No content

Slide 55

Slide 55 text

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

Slide 56

Slide 56 text

Any takeaways

Slide 57

Slide 57 text

Even if you are not directly contributing to libraries you have still a lot to share 

Slide 58

Slide 58 text

"XFTPNF 3FDPNQPTF

Slide 59

Slide 59 text

Make ideas clearly stand out in your examples, no matter how complex they are 

Slide 60

Slide 60 text

Useful Example Complex example Simple example

Slide 61

Slide 61 text

Even if something wasn’t clear from the first time there is always another way 

Slide 62

Slide 62 text

%KBOHP(JSMT,ZJW

Slide 63

Slide 63 text

No content

Slide 64

Slide 64 text

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

Slide 65

Slide 65 text

Image source: https://twitter.com/kosamari/status/859958929484337152 $PEFEPPEMFTCZ.BSJLP,PTBLB

Slide 66

Slide 66 text

No content

Slide 67

Slide 67 text

No content

Slide 68

Slide 68 text

Code Example Input Output

Slide 69

Slide 69 text

No content

Slide 70

Slide 70 text

No content

Slide 71

Slide 71 text

Even if something wasn’t clear from the first time there is always another way