Codementor Events

5 reasons you shouldn't integrate ready-to-use components into your project.

Published Apr 10, 2020Last updated Apr 20, 2020
5 reasons you shouldn't integrate ready-to-use components into your project.

When I started programming a few years ago, I soon learned that a "good" coder works by the premise of "Don't reinvent the wheel". This means whenever you can, you should use a solution which is already out there because someone else solved it for you.

Back then, stackoverflow was full of jQuery solutions ready to be copied. When you had a specific problem in your mind you googled it. When there was something, you just integrated it into your project, saving aditional effort and work. You carried on to the next requirement.

But as my work and projects became more complex during the years, I learned that this approach might be counterproductive.

These days it is not jQuery anymore but rather react. As a react native developer there is an astonishing library that enlists all major react native modules on github called https://github.com/jondot/awesome-react-native. For different needs you will find your library. For instance https://github.com/react-native-community/react-native-modal, which gives you an improved version of the react-native modal with all sorts of additional functionalities.

These components are great, do not get me wrong, but generally I try to avoid such libraries. Of course, frameworks such as React and tooling are essential for your projects are out of discussion, but try to seek your own solution whenever possible. Here are the reasons why:

1. You will understand it

When you use a ready-made solution you often don't understand it. It just magically works but as project requirements become more complex, you might need adjustments over time. If you do not understand the component, chances are high, you will not be able to modify it.

If this happens you will have to put the time into understanding the code someone else wrote and this often takes more time than understand the code you wrote yourself.

Also, dependencies change, and the code you implemented might get obsolete over time. Ultimately, this leads to conflicts and headaches. With your own solution this rarely happens.

It might be hard to write your own components at the beginning, but it will definetly pay off in the long run.

2. Clean, slick and more performance for your app

Developers who publish their modules wan it to be compatible to a major audience, therefore they often put a lot of functionality in them. Your own made component is often simpler, celaner and therefore tends to be more performant. In times of page speed and reaction time, pace is everything.

3. You will become a better programmer

The more you write code of your own, the better you become. You will understand how things work and even though it takes more time at the beginning, you will soon find out how your work flow and code quality improves. Be ready to become an expert in the framework or language of your choice.

4. Publish your own modules

Once you become really good at programming your own solutions, it is apparent that you can share it with others. This will give you perhaps more credibility as a professional and you will be able to show code to your future stakeholders.

5. Okay, just use it if it is really necessary (or cool) 😃

Undoubtly, every programmer who uploads a component or library must be praised. He or she put a lot of work into it and we should be grateful that they did it. I sometimes also find a component very appealing and if it becomes clear that coding it by myself would take a lot of time, I choose top use the module in my project.

Discover and read more posts from Sebastian Glahn
get started
post commentsBe the first to share your opinion
Show more replies