React

Description

We have historically built UIs in Astra using either React or regular Rails views. When we adopted React, it was primarily to address two needs:

  1. Building complex interactive UIs
  2. Creating SPA-like experiences with fast page transitions via Redux cache and client-side routing

React enabled us to build sophisticated interfaces that would have been difficult to maintain with jQuery or other DOM manipulation libraries. Its component-based architecture helped organize complex UI code and manage state efficiently.

However, with the introduction of Hotwire, we found we could achieve similarly complex UIs without the overhead of an SPA.

Technology Status at Wunder

Retire. We have adopted Hotwire and Apollo over React for new UI development.

No new UIs should be built with React. We will continue maintaining existing React components that haven’t yet been ported to the new design system. When substantial changes are needed to existing React components, the team should evaluate whether migration to Hotwire is warranted.