I've been venturing out on my own and building projects, using resources like Frontend Mentor and cloning websites. I've faced situations where I thought installing a package could save me from coding everything from scratch. However, I recall tutorials stressing the importance of keeping file sizes small and limiting packages. For instance, I used a package for a carousel that I needed multiple times, which felt justified. But for handling a side menu, I hesitated and ended up installing a package that allowed me to close the menu when clicking outside of it, as nothing else worked. Should I be cautious about installing many smaller packages, or is it acceptable to use them to simplify my code? What's the right balance?
5 Answers
There's really no strict answer—it depends on your situation. Since you're still learning, it's sometimes better to avoid packages to truly grasp the fundamentals. For instance, creating your own carousel can be tedious but invaluable for understanding how it works. Focus on understanding first, then choose to import and adjust as needed. Too many rush to skip the basics, but knowing the core concepts will help you manage and understand any packages you might later use.
You usually have too many packages if you notice redundancies or if some aren’t even being used. If a package serves your purpose without unnecessarily inflating your file size, you’re okay. Otherwise, you might want to build it yourself. Just keep an eye on what each package offers and avoid those that bloat your project.
There isn’t really a maximum number of packages you can use. Some large-scale projects I've been involved with have had hundreds of dependencies, and all were essential. With experience, you'll figure out how to balance between using packages and writing your own code.
Honestly, it comes down to your needs for the project. If you need something, why not use a package instead of reinventing the wheel? Just make sure they don't slow you down with page load issues. If file size isn’t causing problems, don’t stress about it too much.
That's exactly what packages are designed for! If a package meets your needs efficiently, go for it. The trick is knowing when it’s necessary and when you might be adding too much weight for little benefit.

Related Questions
How To: Running Codex CLI on Windows with Azure OpenAI
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically