I've been venturing out of the tutorial stage and working on my own projects, tackling challenges from platforms like Frontend Mentor and even cloning websites. I've hit some roadblocks where I thought, 'I could just install a package for this instead of coding it all from scratch.' However, I remember tutorials stressing the importance of maintaining small file sizes and limiting the number of packages used. For example, I added a carousel package since I needed it for multiple components, which felt justified. On the other hand, I hesitated to use a package for managing a side menu—which I later regretted when I ended up installing a package just to close it when clicking outside. So, how many of these small packages can I use without it being considered excessive? Should I focus more on coding things myself to reduce file size?
5 Answers
This is all about balancing needs and capabilities. It's smart to avoid overcomplicating with packages, but also don't shy away from using them if they simplify your work. Just ask yourself: Is the file size causing slow load times or noticeable issues? If not, keep building and learning as you go. You'll find your balance with experience!
The answer really depends on your learning phase and project goals. If you’re still picking up the basics, even one package might feel like too much. Building things like your own carousel could seem tedious, but it's great practice! Understanding the core principles will help you use package-based solutions more effectively later. So, remember:
1. Understand
2. Import
3. Adjust
Many jump right to using packages without fully grasping how they work. If you get the basics down first, you’ll better manage dependencies in your projects.
Totally agree! Some things, like toasts or notifications, seem to require more styling, so I’ve always relied on packages instead of building them from scratch.
That’s literally what packages are designed for, so use them when you find one that fits! Just be wary of adding unnecessary bloat. If a package helps you achieve your goals and you understand what it does, then roll with it!
You know you have too many packages if some sit unused or overlap in functionality. Use what you need! If a package is hefty enough to weigh down your project but doesn't add significant value compared to coding it yourself, it might not be worth it.
It really varies. You can use as many packages as you need to get the job done. Think about whether they’re truly essential or if it just feels easier to rely on them.
That makes sense! I can build things in a controlled setting, like for a project I did that involved a Steam Store clone with multiple carousels. Using a package for that made it easier to customize parts.