Common design patterns in React
| Command | Description |
|---|---|
Container / Presentational | Logic vs UI separation |
Composition | Combine small components |
Custom Hooks | Extract reusable logic |
| Command | Description |
|---|---|
withAuth(Component) | Higher-Order Component |
<List renderItem={item => <Item />} /> | Render Prop |
| Command | Description |
|---|---|
<Menu><Menu.Item /></Menu> | Implicit state sharing |
React.Children.map | Manipulate children |