Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Understanding Recompose through examples

Olena Sovyn
November 26, 2017

Understanding Recompose through examples

Olena Sovyn

November 26, 2017
Tweet

More Decks by Olena Sovyn

Other Decks in Programming

Transcript

  1. 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
  2. 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
  3. 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
  4. 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
  5. 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
  6. 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
  7. %VOOJOHr,SVHFSFGGFDU Confidence Wisdom first usage of one of Recompose HOCs

    reading Recompose
 documentation trying to use Recompose on practice
  8. 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
  9. 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
  10. 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
  11. 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