Sync engines: the missing step function in React development
- · 3 min read
- Engineering
- Product
In his conversation with Silver.dev founder Gabriel Benmergui, Dax Raad talks about the sync engines he tried, why he settled on Zero, and how that changed his frontend work. Dax is the creator of OpenCode at Anomaly, the team behind SST and terminal.shop.
He opens the clip with a question about the industry's priorities:
"How is a whole industry just going about their day when this thing exists?"
He's frustrated by the attention given to rendering optimizations while an application like Linear already offered an experience he found exceptional. The clip follows his attempts to find a sync approach he wanted to use himself, then turns to Gabriel's question about developer experience.
Linear versus the rendering debate
Dax remembers SSR and edge rendering dominating the discussion for years:
"Like, why are we all talking about like SSR and like edge rendering and all these, like for years, that was like the focus."
He contrasts those discussions with Linear, describing a basic React single-page application using styled-components:
"We're obsessed with like these stupid little incremental optimizations, when Linear was sitting there, basic React SPA with like styled-components, like just out-of-the-world experience."
His question was: "Why does nobody care about the sync engine thing?" Seeing that experience made him want to figure out the approach, so he decided to work through the available options himself.
Trying Orbit and urql
Dax first describes connecting a JSON API to Orbit, a library that synced data locally. He ran into issues with that approach and moved on to GraphQL.
There he tried urql, which he says could also replicate things locally. These attempts improved on one another, but he hadn't found what he was looking for:
"But again, like every iteration of this got a little bit better, but it wasn't... there was something missing."
He doesn't go into the individual problems he encountered with either library in this clip. He describes them as steps in his search before finding Replicache.
Finding Replicache and Zero
Replicache was the option whose mental model felt right to him:
"Uh, and then I found Replicache, which I think has the right mental model around it."
He credits the team's experience with synchronization across several companies. In his view, that history means they understand the problems developers run into.
Dax then describes the progression to Zero in his own shorthand:
"Uh, Replicache eventually became Zero."
By the end of that search, he'd settled on Zero:
"And this is what I'm using across the board for, for everything now."
What changes for frontend developers
Gabriel shifts the question from the end user's experience to the developer's. He says he no longer codes every day, but can still make a decision and ask his developers to use a sync engine.
Dax starts his answer with the upside:
"Uh, on the plus side, it makes front end the dumbest work ever."
He explains what he means by naming the annoying parts of frontend work: mutating data, coordinating with the server, making calls and orchestrating them correctly, and managing loading states. Those are the tasks he's referring to when he says:
"All that is just gone now."
His description of the frontend that remains is concrete. It assembles markup and styles it, with the data available to query locally:
"So your front end is just assembling markup, styling it, and the data is just always there and you can query it locally."
Watch the clip on this page, or watch Dax Raad's full conversation with Gabriel Benmergui.