DEV Community

Joe
Joe

Posted on

 

UI, Logic, Refactor

Before I begin creating a new react component. I first start off by drawing the UI on my yellow pad with mongol 3 pencil and then translate it into code using HTML & CSS. Therefore I can see the overview of what I'm trying to build hmmmm... maybe this is something like a blueprint to my component πŸ€”. Then I add the logic to that UI using state and stuff in React. Then I'm going to delete that new component file. Yeah delete it, uhhm hmm. You know why? I figure out that there is already an existing package from npm waiting to be install on my codebase.

saved my time. Yes!!

The lesson I've got from this is that I should never re-invent the wheel because the best code in your codebase is not your code it's other people's code and I'm going to value that by not re-inventing their wheel instead just reverse engineer it and learn from it and also maybe build something new out of it. As a result before I begin in doing things by myself. I must first need to know where to begin.

Salamat.

Latest comments (0)

Top Posts from the React Ecosystem

1. Changes In The Official React Documentation

The former React Docs Beta has been officially released as the updated React documentation at react.dev after years of hard work and refinement. Check out the brand new React Docs: What’s New in the Updated React Docs

2. CRA's Time is Over

React developer team has removed create-react-app (CRA) from official documentation rendering it no longer the default setup method for new projects. The bulky setup, slow, and outdated nature of CRA led to its removal: create-react-app is officially dead

3. How to Fetch Dev.to Articles for Your Portfolio

Integrate the articles of your Dev.to profile into your personal portfolio with either React, Vue, or Next.js by following these simple steps. It outlines how to include frontend to pull the information and correctly utilizes the Dev.to API: How to Fetch Your Dev.to Articles for Your Portfolio with React