When programming, it’s important to structure your codebase so that you reuse code where possible. Duplicating code can bloat the codebase and complicate debugging, especially in larger apps.