WhoBuilt

How you can Server-Render without Rendering on the Server

Sep 25, 2024· 30 min· 469 views·Watch on YouTube

Speakers

Mike Grabowski, founder and CTO of Callstack, and Eric Vicenti, COO of Sia, present Rize Tools at React Universe Conf 2024 and show how server-defined rendering can add features to React Native apps.

Server-defined rendering for mobile apps

Grabowski and Vicenti describe a setup where a server defines which client components to render, while the app handles rendering. They say the approach is used at companies including Instagram, Shopify, and Lyft, and introduce Rize Tools as a modular way to add it to React Native apps.

Live changes to the conference app

The presenters use the React Universe Conf app to demonstrate changes that reach a production build. They move sponsor content, add an open source sponsor tier, and build an archive screen with videos from past conference editions. The demo uses WebSockets and a tunnel running through a $5 VPS, with a few connection hiccups.

Rize models and server setup

Grabowski explains that the client connects to a server model source and can receive component definitions and actions such as navigation or opening a URL. On the server, query models load data, state models hold values, view models track dependencies, and lookup models select data by a path parameter. The presenters show how these pieces can combine to build an archive organized by year.

Building an internal editing tool

Using Rize Playground, the presenters build an admin tool backed by a local Postgres database. They add screens to browse conference editions and videos, then demonstrate editing a video's details, updating its thumbnail, and deleting it. Server functions update the database, invalidate related queries, and send feedback actions to the client.

Production use and project status

The presenters summarize Rize Tools as a way to add features to existing apps and prototype internal tools through the Playground app. Vicenti says the project is in production, describing an iPad control app used to operate a 20-meter-wide structure with 25,000 LEDs at Burning Man, attended by 60,000 people. Grabowski says the project is on indefinite hibernation.

Takeaways

  • Server-defined rendering can let teams change app content and features without waiting for a new client release.
  • A modular client component set and server model source can make gradual adoption easier in an existing React Native app.
  • Separating queries, state, views, and parameterized lookups gives server-driven interfaces a composable data model.
  • Internal tools built on the same system can edit production content, but should account for query refresh and user feedback.
  • The presenters describe Rize Tools as having been used in production, while also noting the project is indefinitely hibernating.

Mentioned in this talk

Search inside this talk

What was claimed 12

Related talks