Facebook open-sources tools for fast React app creation in JavaScript

The social giant's newest open source offering provides a rapid way to set up the prerequisites for building React apps in a complex JavaScript environment

Facebook open-sources tools for fast React app creation in JavaScript
Credit: Patrick Hund

Facebook's React.js library is now used to create native applications for multiple platforms, including iOS, Windows 10, and Android. But like any other framework, it needs a certain amount of assembly and heavy lifting.

To that end, the social media giant's new open source project, Create React App, could be described as a power lifter. Create React App provisions three key tools needed when building React applications: the Webpack asset-bundling tool, the Babel JavaScript compiler, and the ESLint code-linting tool for the language. The app obtains and sets up the proper versions of all three, and it leaves the developer free to do more of the actual app creation.

With Create React App, Facebook is offering for the first time a tool that deals with the environment for building specific kinds of JavaScript applications. JavaScript's ecosystem has acquired a reputation for being mutable and fragile, so developers often have to assume the burden of making everything work together.

Many of these issues were aired in a post at Facebook's React blog, where React team member Dan Abramov cited the "overwhelming explosion of tools" that come with developing not only with React but in JavaScript generally. "By choosing React (and inherently JSX), you've unwittingly opted into a confusing nest of build tools, boilerplate, linters, & time-sinks to deal with before you ever get to create anything," Abramov said.

Create React App is meant to address this, not only by bundling and preconfiguring several key prerequisites for React, but by minimizing dependencies and removing the need to configure the tool. There are, by design, no configuration options for Create React App.

This last decision might spark controversy, since it makes the tool more closed-ended and single-purpose. One possible defense is that because the tool is open source, it can be configured directly. Another point, raised by Facebook, is that once Create React App finishes its configuration the user is free to apply any postcustomization needed.

"If you're experienced with build tooling and prefer to fine-tune everything to your taste, this lets you use Create React App as a boilerplate generator," said Facebook.

A likely next step for Create React App is to apply to other apps, with the same kind of complex dependencies, its methodologies for setting up environments. By that token, Create React App could become a hit not only with React devs but with anyone in the JavaScript world who wrestles with setting up a dev environment.

From CIO: 8 Free Online Courses to Grow Your Tech Skills
Notice to our Readers
We're now using social media to take your comments and feedback. Learn more about this here.