Isomorphic JavaScript Recommendation

Isomorphic JavaScript is code that can run on both the server and the client. The benefits of this are that the initial page can be rendered server-side to improve page-load times, with the JavaScript also being loaded client-side to enable dynamic updates. The recommended stack is;

  • Code written in React
  • The static site generator Gatsby to implement
    • The first implementation of this was in the prospectus repo.
    • As part of the build process static HTML files are generated for each page.
    • The Discovery Scale pod are currently tasked with looking into the scaleability of this approach (to enable regeneration of pages based on updates to external data).
  • The server generated code assumes logged out users
    • The componentDidMount method is utilized to update the pages with any user specific information.

Alasdair Swan (Deactivated)
June 26, 2017

Yes, I think we should be using Preact client-side too David Ormsbee.

Alasdair Swan (Deactivated)
December 12, 2018

I played around with Preact with the marketing site about a year ago and it wasn't proving a straight swap for React (missing functionality, mainly around testing). The Discovery Squad tried again a few months ago and it looks like Preact just isn't stable enough / feature complete enough for us to use in production.