Categories
Architecture JavaScript React

Redux: Flux, But Simpler (Mostly)

Redux launched this month and is spreading quickly through the React community. It's another state management library solving similar problems as Flux, but with a radically simpler approach: three principles, one store, pure functions.

After building with it, I'm convinced Redux's constraints are its strength. But those constraints require discipline most teams don't have.

The Flux Problem

Categories
JavaScript Mobile Development React

React Native: JavaScript Everywhere, Literally

Facebook open-sourced React Native this week, and the pitch is bold: write native mobile apps using JavaScript and React. Not hybrid apps like PhoneGap—actual native apps with native performance and native UI components.

This is ambitious. The question is whether JavaScript's "write once, run anywhere" promise finally delivers or disappoints again.

What React Native Actually Is

Categories
JavaScript Web Development Year in Review

JavaScript in 2014: The Year Everything Changed (Again)

Twelve months ago, the JavaScript landscape looked different. Angular dominated frontend. Grunt was the build tool. ES5 was the language. Bower handled frontend packages. Node was interesting but niche.

Today, everything's in flux. React is challenging Angular. Gulp is challenging Grunt. ES6 is being used via transpilers. npm is taking over from Bower. Node powers build tools everywhere.

Let's look at what changed and what it means.

React: The Challenging Newcomer

Categories
Architecture JavaScript Web Development

Isomorphic JavaScript: Same Code, Client and Server

"Isomorphic JavaScript" is gaining traction—write code that runs on both server and client. Render on the server for fast initial load, hydrate on the client for interactivity. The promise is having your cake and eating it too: server-side performance with client-side dynamism.

After building a few isomorphic applications, my take: it's powerful but not simple. You're not writing code once, you're writing code that accommodates two environments.

The Problem Being Solved

Categories
Architecture JavaScript Web Development

Component Architecture: The Pattern That’s Emerging Everywhere

A pattern is emerging across frameworks: organize UIs as trees of self-contained components. React does it with JSX. Web Components do it with custom elements. Angular 2 (being developed now) is redesigning around components. This convergence is interesting—but the implementations are incompatible.

Why Components Won

Categories
Architecture JavaScript Web Development

React: Rethinking Best Practices (or Breaking Them?)

React showed up last May at JSConf, and the initial reaction was skepticism. Facebook's pitch—"we're putting HTML in JavaScript"—sounded like a regression to the bad old days of mixing presentation and logic. But after spending time with it, I think React is asking the right questions, even if the answers feel uncomfortable.

The Separation of Concerns Debate