There are six different levels of reusability that you can use in your components.
Each level increases your ability to reuse code.
These levels are the focus of my course, Reusable Components.
Here are the six levels of reusability:
- Templating — Reusing code by wrapping it up inside of a component
- Configuration — Using configuration props to allow for varying behaviour
- Adaptability — Allowing components to become future-proof
- Inversion — Letting other components control the process
- Extension — Using reusability throughout our component
- Nesting — Creating powerful hierarchies of components
I cover this in more detail in this excerpt from the course.