Mark Eschbach

Software Developer && System Analyst

React

React is a JavaScript framework pushing a pure functional view of manipulating DOM with the aim of supporting large applications. Originating from Facebook and publicly released in the early 2010s was a direct competitor to AngularJS. Due to the intent of being a pure functional framework React constrains the way a component may change throughout it's lifecycle. A result of these constraints means React may make specific assumptions regarding the changes to the virtual DOM backing the components and thus optimize the synchronization with the actual browser DOM.

From a developer's perspective an application is built out of React Components. Each component has a life cycle for responding to rendering events and state changes. In a traditional React.Component class style implementation you may hook into these via overloading methods, such as React.Component#componentDidMount which will be called after the component is attached to the virtual DOM. With a component implemented as a JavaScript function there is no state storage and may only generate output based on the parameters passed.

React took the tag-like approach with expressing component hierarchies via a custom set of extensions to JavaScript called JSX. JSX translates into a series of function calls to wire up the components properly. JSX uses a bracket notation to allow for JavaScript expressions on both properties and CDATA sections. Functions and classes are easily picked up as tags. Combining these makes for a decent developer experience as opposed to to similar approaches taken by JSTL.

The React community has embraced the functional paradigm and the opinionated architectural approaches behind the framework. The community has produced a large number of libraries further enhancing the capabilities, such as Redux and ReactNative.