Which is better? Both. :p
It's a never-ending question in the world of software development: when to create new and when to use existing. Each has its benefits and drawbacks. Generally, for well-defined tasks that have undoubtedly been done by others more times than you can count, there's a good chance you can find some 3rd party component that you can utilize, saving you a lot of development time and hopefully having already had most of the bugs knocked out of it already.
However, if the component is not a near-perfect fit for your needs and you have to start tweaking, customizing, adding to it, breaking it, then throwing your keyboard out the window, it's probably not worth it. Either you need to find a different component that better matches your needs, or you've located a portion of your system that is unique enough that it is best addressed by creating your own custom component from scratch.
Also, when you create a component yourself from the ground up, then (hopefully) you know exactly what it does, it does no more than you need it to, and you probably will learn some useful skills and information by building it.
So in summary: it depends. :rolleyes: