VOOZH about

URL: https://thenewstack.io/pivoting-from-react-to-native-dom-apis-a-real-world-example/

⇱ Pivoting From React to Native DOM APIs: A Real World Example - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2024-06-24 06:00:09
Pivoting From React to Native DOM APIs: A Real World Example
Frontend Development / JavaScript

Pivoting From React to Native DOM APIs: A Real World Example

One dev team made the shift from React’s "overwhelming VDOM" to modern DOM APIs. They immediately saw speed and interaction improvements.
Jun 24th, 2024 6:00am by Richard MacManus
👁 Featued image for: Pivoting From React to Native DOM APIs: A Real World Example
Image via Unsplash+. 

To develop the user interface of its web browser, Edge, Microsoft recently began moving away from React and other JavaScript frameworks to embrace what it called an “HTML-first” approach. Instead of using React to create the user interface — the most common web development paradigm today — the Microsoft Edge team pivoted to an approach it described as “markup-first, small bundles, and less UI-rendering JavaScript code.”

After we published that post, I was approached by a developer who had also made a similar transition. Julien Moulis is a senior frontend developer at a Swiss IT company called Eukleia, which is building a custom developer tool called Mindsapp. Moulis reached out to tell me that for Mindsapp, his team “decided to make the shift from React’s overwhelming VDOM to the fantastic modern DOM API.”

“A few months ago, we decided to transition a part of our application from React to vanilla JavaScript.”
– Julien Moulis, Mindsapp

We’ll get into what that means shortly, but first I want to quote Moulis on what changed and the impact it had on their end users. (And note that because Moulis isn’t a native english speaker, I have lightly edited his quotes for language clarity.)

“I could not understand how, for only updating text, analyzing a VDOM and all the concurrencies and hundreds of functions, could be faster than just updating the DOM element itself. So I built a small SSR Node.js, for reactive data and routing, RxJS for the frontend web components — and we reduced the load time on some pages with a lot of data, from 6 seconds to 300ms.”

To summarize, Moulis streamlined his application by moving from a complex virtual DOM-based framework (React) to a simpler and more direct approach using modern web technologies, resulting in much faster load times for users.

So how did he do this? I asked Moulis to tell me the story.

“A few months ago, we decided to transition a part of our application from React to vanilla JavaScript,” he told me. He described his company’s app, Mindsapp, as “a low-code application to enable us to develop applications faster — it’s an app made by developers for developers.”

Since the whole point of Mindsapp is to help developers speed up their development, the team were concerned that React was actually slowing it down.

The Problems With React in Mindsapp

“The thing is, we felt that our needs no longer aligned with the React paradigm.”

One of the features of Mindsapp is a page creator, where the pages are a graph network built with Neo4j. Moulis explained how the React version using pages had worked:

“When I request a form, I receive an object that contains, among other things, an array of elements. […] Until now, when I received these elements, I passed them through a recursive function that built the various React components based on a Map indexed by the ‘component’ property. Once rendered, the user had access to all basic form interactions, navigation, etc.”

They also used React’s context API and reducers “to manage all data and updates,” and for routing they used React-router.

There were a couple of key problems with this React approach. The first was “unnecessary renders” — even though they’d made “significant efforts to optimize using the available hooks.” The second was issues with routing. “Since the pages were objects returned by the backend,” said Moulis, “we couldn’t define all the routes in advance.”

After thinking through the problems, Moulis asked himself this question: “How can modifying a simple input value and displaying a simple span with the entered text be faster through a framework than directly accessing that element?”

This motivated him to find a solution closer to the browser platform.

“The thing is, we felt that our needs no longer aligned with the React paradigm,” he told me, adding, “I emphasize that this is a specific case to us.”

Implementing the Native DOM API Approach

After various attempts to modify the structure of their app, Moulis and his team eventually “chose to get closer to the native DOM APIs.”

“We were completely surprised by the speed gain.”

“To do this, we set up a simple SSR server (Node) to prerender our backend objects and produce our components via a simple template string parser and a map,” he said.

Here is the overview of what the Mindsapp team did, according to Moulis:

“To achieve this, our Link component sends requests directly to the SSR server. If the response is okay, the SSR sends back the page; if there’s an error, it sends a 500 or 404 page, which we can configure on our page creator. We also set up a simple RxJS fromEvent directly on the window object to handle native browser navigation, which itself also sends requests to the SSR server.”

This took them a month to implement, but the results were immediately noticeable after that.

“We were completely surprised by the speed gain,” Moulis said. “Our application engine is designed to produce complex ERP-type applications, which involve heavy data consumption to present in real-time. On a page we consider complex, with over 800 DOM elements, some of which use different subscription systems via our event system at initialization to update when necessary, the overall load time dropped from 4-5 seconds to 400ms.”

“In terms of interaction, no more endless checking to ensure a child doesn’t refresh even if the parent state updates.”

As well as speed gains, the user interactions markedly improved, said Moulis.

“In terms of interaction, no more endless checking to ensure a child doesn’t refresh even if the parent state updates. A simple trivial example: a user might want to change the background color of a card on click, which itself contains a graph. We can do this without worrying about the graph refreshing or not.”

Drawbacks

Moulis acknowledged, however, that the HTML-first approach does come with baggage. He describes Web Components as “very verbose” and notes that “we become responsible for ensuring [that] all subscriptions made by the elements are properly cleaned up when the elements are destroyed.”

He added that finding developers who know vanilla JavaScript and not just the frameworks was an “unexpected difficulty.”

“Nevertheless,” he said, “the user gain is enormous, and that has always been our priority.”

More Post-React Stories Needed

If you or your company has also transitioned away from React and into a more web-native, HTML-first approach, please tag me on Mastodon or Threads. We’d love to share further case studies of these modern, dare I say post-React, approaches.

Indeed, tag me too if you don’t think React should be dropped — what’s your case for that?

TRENDING STORIES
Richard MacManus is a Senior Editor at The New Stack and writes about web and application development trends. Previously he founded ReadWriteWeb in 2003 and built it into one of the world’s most influential technology news sites. From the early...
Read more from Richard MacManus
SHARE THIS STORY
TRENDING STORIES
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.