This repo is maintained to have collection of react patterns & best practices used in the community. This repo provides you the collated list of all the patterns used in the community. If You have discovered one & would love to share your own react pattern simply send us a PR 🙌
This is highly inspired from Kent C. Dodds. So special thanks to him for the lovely react patterns in life 😊
- Compound Components
- Flexible Compound Components
- Prop Collection
- Prop Getters
- Render Props
- State Reducers
- Higher Order Components
- Provider Pattern
- Functional setState
- Destructuring and spreading props
- Runtime type checking with prop types
- Using defaultProps
- Using displayName
- Conditional Rendering
If you want to propose a pattern you should submit it with below points:
- What is so special about this pattern?
- Use case or inspired from ?
- Example (CodesandBox preferred)