New NPM will simplify React JavaScript development

14.03.2016
The Enclave NPM module currently under development will offer smoother project setup in Facebook's React JavaScript UI library.

Enclave provides an NPM for compiling JSX and ECMAScript 2015 code into "browser-ready" JavaScript. It takes developers through a series of prompts, creating an enclave.js file in an application's root that will be used by Enclave to reference a build.

The project arose out of what its developer describes as complexity in configuring React applications with Webpack and Babel, and the experience with compile-to-JavaScript applications like Elm and CoffeeScript.

"I developed Enclave because after a year of doing React professionally, I still wasn't comfortable setting up a new project," developer Ean Platter, a software engineer at TechnologyAdvice, said. "It was tedious and frankly just not worth the effort. A lot of Web developers aren't used to having to worry about compiling their code, they just drop in a CDN and it's ready to go."

The eventual goal with Enclave is to maintain a "sane" API that's less reliant on Webpack. "All in all, this is open experimentation. Hopefully if you're wanting to get started with React you'll find Enclave is a helpful tool to get you up and running quickly," the project's GitHub page states.

TechnologyAdvice, which builds SaaS products and uses React for front-end development, started building Enclave within the past two weeks. "Just as Enclave is to help give people frictionless entry into building React applications, we want the contributing process to be as frictionless, especially for folks wanting to get into open source," Platter said. As such, he wants to keep Enclave's code and its API as unambiguous as possible, but more structure is needed. "There's a lot of low-hanging fruit for developers interested in contributing."

Despite the difficulties, Platter remains a fan of React. "The biggest thing that keeps me tied to React is the fact that it's not HTML-centric. You're writing JSX (HTML-like markup) in your .js files, which means you can pretty much do anything."

(www.infoworld.com)

Paul Krill

Zur Startseite