/react-reuse-patterns

Code for meetup on code reuse patterns in React apps

Primary LanguageJavaScript

React reuse patters

This repository contains examples used for Wix Engineering meetup
Link to meetup
Link to slides
Video in Youtube

The app was created using create-react-app
React components used in the examples:

The directories are divided according to the presentation phases, each contains a MainView component.
To render the relevant part, switch the import of MainView in App.js
The parts are:

  • No reuse
  • Simple composition
  • Repackaging with composition
  • Repackaging with HOC
  • HOC communication with inner component (withState example)
  • Render callback - Dynamic communication with inner component (withState example)