Have you created a React component? I have, a lot of them. Although, I still remember the first one.
I was making a React course and had to implement the Button
. To do so, I created a new Button
folder and Button.component.jsx
, Button.styles.scss
, index.js
files.
Next, I opened a component file, wrote the boilerplate and started implementing. When I finished, I had to add an export line to index.js
, so the component is exported from the folder. Also, added an export line to components/index.js
file to export the component from the components
directory.
You know the process, right? :)
While I was creating the Input
, my mind’s second thread started cooking a thought: Am I repeating the same things that I already did couple of minutes ago? WTF? There should be a way to automate it!
But the excitement had a bigger place in my head and I just continued manually creating boilerplate to finish it ASAP and start sending CVs.
Each time I was creating a new component and was forced to waste my time manually creating a new folder, files, importing, exporting, defining… I was coming back to that thought. Am I a developer or what? I should automate the workflow and let machines do their job!
But time passed and I kind of accepted the status quo of manually creating files and writing the same imports, exports and so on...until one day.
The day I decided to create a side project. I needed an idea and what can be better than solving my own problem? You’re right — nothing!
So, I did a small research and found couple bash scripts to create boilerplates. It was a good sign, I wasn’t the only one who had this problem. Perhaps, I should just use one of these tools and spend my time on another project? I studied them and concluded that it was not exactly what I wanted. Using them was not a pleasure for me and I started to think about my own solution.
Stay tuned.
P.S. If you have an idea that you want to implement for a long time, this is the sign! Think about MVP that you can implement in one evening and just start the project!
P.P.S. Share what you did on twitter, I’ll be happy to see it.
Last updated 7.03.2022