Composable React Architecture
Improve composability by reducing dependency graphs.
Note: This repo is from 2016/17. While the basic concepts and syntax apply, changes in React (e.g., hooks) and other libraries enable simpler and cleaner implementations. I also rewrote style composition to be more consise, performant, and unit tested in later projects.
- React HOCs (Higher order Components) for everything
- Children via
- Styles via
- Events via
- Redux data via
- GraphQL data via
- Sprinkle lodash/fp and recompose
- That's it!
More details on HOCs and usage in
Installing & Running.
Includes GraphQL, React, Redux, and a few others. See
Built on create-react-app.
- public/index.js - initializes the redux store and renders
- src/reset.css - reset styles...
- src/components.js - All demo components. Exports most. Includes app.
- src/hoc-utils.js - all the HOC util functions for the demo
- src/styles.js - integrates styletron, provides styles shorthands and HOCs
- src/api.js - graphql schema and some basic api interaction functions