DEV Community

Cover image for Why You Should Make Your Own Create React App Template
Jimmy McBride
Jimmy McBride

Posted on

Why You Should Make Your Own Create React App Template

Because it's cool!

If React is the main tool you use to express your passion, you should create your own create react app template. Not because it's cool (BECAUSE IT IS!), but for reasons much deeper then that.

It will make starting up projects a much more DRY experience.

Don't repeat yourself. Aren't your tiered of setting up the same dependencies over and over? Tired of deleting the exact same files, again and again. Stop repeating yourself today and make your own react app template!

It will save you a TON of time!

Imagine how long it takes to set up all that boiler plate just so you can finally start working on your project. Just cut that time out by making your own react app template. Make create react app work for you! Not the other way around. How do you wish it was set up? Would you like to have Material UI already set up? How about having redux and middle-ware set up and hooked up already? Pre-setup react router? I think, YES!

But, how???

At this point, you might be saying to yourself, "Well, Jimmy. Creating your own react app template seems nice and all. But, how do I do it? Seem's easier said then done."

Surprise, surprise!

Setting up your own create react app template is easier than you think! I wrote a blog about how to do it from scratch, here! I had trouble finding resources when I did it, so I documented my process so that anybody who knows how to use create react app and has an email verified npm account can make their own template. For personal use, or for use in team environments. Creating your own react app template will pay you back in dividends.

But don't stop there!

Why not take it to the next level and write your own bash script! How would you like to type in a command like; create app-name and have it create a react app with your custom template, change into the project directory, open the project in your favorite text editor, and spin up the server on local host, all in one easy command! Sounds pretty cool right?

Do you want to be more DRY as a human?

Check out my custom react app template bash script here! Just like creating your own react app template, it's easier than it might seem! If you want to learn the basics of creating bash scripts, check out my blog on How To Write A Bash Script 101. To take a deeper look into bash scripts, you can also check out my Bash Script Tool Kit, blog.

Latest comments (2)

Collapse
 
mxoliver profile image
Oliver

This is so cool!!! Going to try this next weekend, would be fun to create a template for my backend server/graphql set up as well so I can have a DRY full stack template

Collapse
 
jimmymcbride profile image
Jimmy McBride • Edited

I was actually thinking about making a backend template in node, but I plan on learning the firestore, so maybe I'll just add some firebase config boilerplate to my template.