Why We Built a Custom React Boilerplate (Hint: Collaboration & Speed)
Tags: react, boilerplate, teamwork, automatedtesting
Published: 2018-11-01 19:50:17

---
title: Why We Built a Custom React Boilerplate (Hint: Collaboration & Speed)
published: true
description: Creating a custom-built React boilerplate can speed up initial development and help teams of developers collaborate more efficiently.
tags: #react #boilerplate #teamwork #automatedtesting
cover_image: https://thepracticaldev.s3.amazonaws.com/i/2r716qfxg9c88ro0oj1w.jpg
---

Creating a custom-built React boilerplate can speed up initial development and help teams of developers collaborate more efficiently. While it required more time up-front to build the boilerplate, it's saving our teams tons of time in the long run.

<strong>This case study powerfully demonstrates the importance of laying a common foundation for collaborative coding.</strong>

Keep reading to learn how they built the boilerplate and what we've seen as a result of using this new tool.

![React boilerplate](https://thepracticaldev.s3.amazonaws.com/i/1jo3aos7ya9r3mdxzht9.jpg)

<h2>A Custom React Boilerplate that Reduces Initial Sprints from 2 Weeks to 3 Days</h2>
Ryan Ostrom and Eddie Rozum, two all-star developers at Praxent, put their heads together to create a boilerplate for use by all teams and developers working on React projects within our organization. The custom-built boilerplate accomplishes the following goals:
<ul>
<li><strong>Reduce the amount of time spent setting up a build process at the beginning of each project.</strong> What used to be a 2-week initial sprint is now usually only a 3-day set-up process, at the most.</li>
<li><strong>Provide every developer with exactly what they need to know for testing.</strong> The boilerplate equips developers with information about what to test and how to write each test. Less experienced developers can now write tests without relying on busy experts from other teams.
<em>The boilerplate documentation has examples for each type of test that needs to be written, plus a holder structure built in. It automatically includes Jest in the test script.</em></li>
<li><strong>Enforce best practices</strong> for new web apps.</li>
<li>Limit errors, facilitating <strong>faster coding.</strong></li>
<li><strong>Make outcomes more predictable.</strong> (We know input and output values ahead of time.)</li>
<li>Re-enforce data integrity for <strong>stronger security.</strong></li>
</ul>

<h2>What's Inside the React Boilerplate</h2>
<strong>The boilerplate presents developers with a production development build script; a local, live development server and pre-arranged folder structures.</strong>

Developers no longer have to create a build process from scratch. Instead, when beginning a new React project, they simply make a few adjustments before they’re ready to start developing.

Here are the customizations each developer has to make to the build process once they've accessed the boilerplate:
<ol>
<li>Customize parameters for the project</li>
<li>Add the boilerplate to source control</li>
<li>Hook up the CI/CD pipeline for continuous integration and deployment</li>
</ol>

<h2>Better Collaboration</h2>
<strong>Eddie and Ryan created this tool to facilitate better collaboration among multiple developers working on different projects within our organization.</strong>

They wanted to create a tool that would allow any new developer added to a React project to quickly catch on and make it easier for senior developers to understand the layout of a project when reviewing code.

The opinionated boilerplate includes built-in structure for implementing automated testing. It has automatic code splitting built into the tool. (Code splitting allows developers to access only the JavaScript they need at any given moment, rather than pulling chunks of related JavaScript which they must manually sift and separate.)

Here is the technology stack used for this React boilerplate:

<ul>
<li><strong>React.js:</strong> JavaScript library for building the interface</li>
<li><strong>Redux:</strong> Library for managing the React application global state</li>
<li><strong>Immutable JS:</strong> Immutable collections for JavaScript</li>
<li><strong>Webpack:</strong> Module bundler for budnling SCSS and JS files</li>
<li><strong>Create-React-App:</strong> Ryan and Eddie started with the React boilerplate called create-react-app for their customized tool</li>
</ul>

<strong><em>Learn more about the custom React boilerplate created by Eddie Rozum and Ryan Ostrom: ["How to Speed up Development on React Projects | React Boilerplate"](https://praxent.com/blog/speed-development-react-projects-using-boilerplates)</em></strong>