Web Development

Should Your Next Project Use React? Component Thinking Comes to the Front End

Two years ago, Facebook open-sourced a JavaScript library whose founding heresy earned it a season of conference-hall mockery. Writing markup inside JavaScript, via a syntax extension called JSX. The mockery has aged badly.

React now sets the terms of the front-end conversation. Its component model has been absorbed into how serious teams think about interfaces, whatever their tooling. And this quarter’s announcements extend the ambition. React Native, unveiled at the project’s first conference, applies the same component model to building native mobile apps. That is Facebook declaring this is not a webpage library but a way of building interfaces, full stop.

Client questions have followed the trajectory. ‘Should our rebuild use React?’ We owe you a working position rather than a vibe. Here it is, organized the way our framework positions always are. What the model actually offers, where it merits its complexity in the work we do, where it does not yet, and the fluency advice that holds regardless.

What React actually changed

Strip the syntax fight and React’s contribution is a discipline. The interface is a tree of components. Each owns its markup and behavior. Each is re-rendered from its data rather than mutated in place.

The declarative turn is the deep change. The jQuery-era pattern we taught for a decade is imperative. Find the element, change the class, update the text. And keep, in your head, the map of every state the interface can reach.

That map is precisely what breaks at application scale. The interlocking mutations our finder and dashboard projects pile up become, past a threshold, too much to hold. The bugs live in the states nobody mapped.

React’s model replaces the map with a rule. Describe what the interface should look like for any given data. Let the library reconcile the difference efficiently. Complex interfaces become compositions of simple, testable parts.

Readers of our design-system coverage will recognize the shape immediately. This is atomic design’s logic arrived in the behavior layer. Components all the way down, and the alignment between the two movements is not coincidence. The industry is converging on components from both directions, and React is the behavior side’s strongest current expression.

Where it earns its complexity in client work

Our deployment line, drawn from projects shipped and declined. React earns its place in the genuinely interactive features embedded within CMS-delivered sites. The program finders with eleven facets. The cost calculators. The interactive dashboards. The filterable directories where interface state is the whole problem.

In that territory, componentized UI with predictable state beats our old jQuery patterns decisively at maintenance time, which is where client money actually lives. We have begun building such features on React inside otherwise conventional Drupal and WordPress sites. The hybrid pattern our architecture coverage keeps predicting, arriving on schedule.

Where React does not yet belong, stated with equal plainness: the content sites that are most of institutional web presence. Rendering content through client-side JavaScript trades away things we hold expensive. Server-rendered HTML’s SEO certainty. Search-engine JavaScript rendering exists, but it remains a shaky bet our technical-SEO practice prices carefully. First-paint speed on the modest devices our budgets protect. And progressive enhancement’s resilience.

A program page is a document. Documents ship as HTML. A framework’s payload buys nothing there that a template did not already deliver. Architecture follows use case, eighth year running.

The maintenance argument, which decides more than the demo does

Because framework decisions are five-year decisions in practice, the maintenance case deserves its own weighing, and it cuts both directions honestly.

For React, at the application tier. The component model’s testability and predictable state pay precisely where our maintenance files hurt worst. The inherited jQuery features whose tangled mutations nobody dares touch. A well-componentized finder handed to a successor team, with its pieces isolated and documented, is a far better inheritance than its imperative twin.

Against React, the ecosystem-velocity tax. The library moves fast. Its surrounding tooling moves faster. A feature built this spring on this quarter’s idioms will need version shepherding across its life at a pace the jQuery era never demanded.

Our mitigation, drawn from the dependency rules we have applied since 2006. Pin and document versions. Keep the React surface area proportional to the interactivity that earns it: a finder, not a site. Structure the components so the library could, at worst, be replaced without excavating the content around it.

Adopt with enthusiasm, architect for divorce. The sentence has now served jQuery, CMS modules, and cloud vendors, and arrives at frameworks with its record intact. The teams that skip it are not choosing React. They are marrying this month’s ecosystem, and the ecosystem, on current velocity, will be someone else by the sit-down dinner.

The fluency advice, and the watch items

Two closing tracks for two audiences.

For teams and careers: build React fluency now, whatever your current stack needs. The component thinking transfers everywhere. It is already improving our non-React work. The talent-market direction is clear, and our own training budget moved this quarter to match, as it did for the Drupal 8 retooling before it.

For the architecture file, the watch items that could move our deployment line. Server-side rendering of React components would soften the SEO and first-paint objections if it matures into routine practice. It is technically possible today, with immature tooling. The ecosystem’s churn rate needs to settle before content-site bets are responsible. This year’s flux-pattern debates suggest a community still finding its idioms. And React Native’s promise, one component model for web and native apps, is exactly the kind of consolidation institutions with app ambitions should watch without yet buying.

The position, compressed for the meeting where it will be quoted. React for the application-shaped features. Templates for the document-shaped majority. Fluency for everyone, and the line re-drawn in public as the evidence moves. It will move. We expect to revisit annually.

This is the same shape as the jQuery position of 2006 and the responsive position of 2010. A technology engaged early, deployed where it earns, and bounded where it does not.