TL;DR: A JavaScript snippet that forces the client to build the app in a hidden div and when it's finished, replaces the server-side rendered div with the client-side rendered div. Mostly for non-React users.
Headless-Render-API.com has Preboot v4 (not v5) integrated because despite being hosted on an Angular Github account, v4 of Preboot works for anything, including React.
Include preboot by adding the prerendercloud-preboot-app-root
attr to your app root. This is all that's required to use preboot.
Using AngularJS/Angular? Read the Angular docs which cover this Preboot integration.
Since preboot builds the client-side driven version of the App in a hidden div, code that was looking at div width will need to be resized. For example, the Flickity carousel qualifies for this.
window.onPrerendercloudPrebootComplete = function() {
// the client view is now active, so resize whatever
// UI elements were dependent on width calculations
}
It's kind of a hacky solution and mostly for Angular apps prior to 2017, so you should try it first and see if it works for your app.
Most likely you wouldn't since React has checksums and can gracefully transition from server HTML to client control. However, if for some reason you were unable to cache state or if you have inputs/forms that need to preserve input before the transition