@abinavseelan
Most of these patterns work best for uncontrolled components
Will mostly be from a component library (Sleek) stand-point
Repository Link: http://bit.ly/fk-ks-react-design-patterns
Kent C Dodd's React Patterns workshop
Common functionality / repeated code
Augmentation purposes
Prop-drilling
Based on React's new context API
Associated components that should / can not exist independently
Semantically link components
Provide users with a simple API, while wiring in all implementation details under the hood.
Provide users with rendering control.
Circumvents the React.cloneElement issue with compound components
Complete render control to the user
Sharing (cross-cutting) state between components
Simplified API with internal wiring
(with Render Props)
Abstract away props that are crucial for internal logic
Make the user do less. 🤓
(with Render Props)
Fixes the prop override issue with Prop Collections
Coupling logic and massaging is now controlled by the developer of the component
(with Render Props)
Maintain internal state (when component is uncontrolled.)
Provide users with helper functions to handle internal state
Logic / state updation control
Prevents overloaded functionality.
Prevents the need for exhaustive props.