I've been learning React and have been working on a project the past month but I am beginning to realize my components aren't necessarily "reusable". I know reusability is an important concept of React but I can't figure out how to simplify my components down so they are.
For example I have a To-Do app using react-beautiful-dnd which contains three components: DragDropContext, Droppable, and Draggable. The overall app contains four components now: the main App component which passes data into the three react-beautiful-dnd components. So far this is incredibly simple and reusable.
Now, I want to add an info button for each task which when the user clicks, brings up the fifth component, Info. To do that I need to add logic to the Draggable component. Next I want to add a feature allowing me to add/delete tasks from the list. To do that, I need to modify either DragDropContext or Droppable components to prevent it from rendering the selected Draggable task.
At this point, what was once a reusable component is now specialized. This is an extremely simplified version of my project currently. I have the same To-Do list but 10+ components that need to all communicate with each other making none of them reusable outside this project without heavily modifying the code for each use. Is there some big concept that I am missing or is this how it is?