As a newbie in the IT industry, I have a lot to learn…
Yesterday when I was building a static web page, I created some json files to make populating the data to the webpage easier. Since I have multiple json files needed to use, I tried to group them into a _data folder in the root, and I thought this must be great because now there is a place for my static json files.
Don’t make things generic / abstract that early, Franky
— My mentor, Shivendra
Imagine we can have many other data that is not json and you will then need to move the files around.
Applying this mistake to a reusable (generic) react component
I have been confused why the component in our project are not reusable, isn’t that reusable component always the best?
Reusable component is good, but there is no rush to create it that early, because time is limited and adding if else statement in the component can make it hard to read.
So may be start with creating individual components for different container first, and move them around in the future.