Given a specific UI component, how would you structure the code to ensure reusability and maintainability?