Speeding Up Your React App With Less JavaScript

Spanish audio is available in the player settings
Rate this content
Bookmark

Too much JavaScript is getting you down? New frameworks promising no JavaScript look interesting, but you have an existing React application to maintain. What if Qwik React is your answer for faster applications startup and better user experience? Qwik React allows you to easily turn your React application into a collection of islands, which can be SSRed and delayed hydrated, and in some instances, hydration skipped altogether. And all of this in an incremental way without a rewrite.

This talk has been presented at React Summit 2023, check out the latest edition of this React Conference.

Watch video on a separate page

FAQ

Mitosis is a tool that allows developers to write code once and generate outputs for multiple frameworks, supporting everything from Angular to web components and other frameworks.

Builder.io aims to address the issue of slow website performance, which is largely due to excessive JavaScript usage that affects startup times and overall user interaction with web pages.

QUIC can hydrate React components and provide solutions for intercommunication without adding significant JavaScript overhead, improving startup performance and interactivity.

Partial hydration is a technique where only certain parts of a web application, or 'islands', are hydrated based on user interaction or visibility, rather than hydrating the entire application upfront. This approach can significantly improve performance by reducing the amount of JavaScript processed on initial load.

The 'Quickify' function is used to wrap React components, enabling them to be lazily hydrated upon specific events like hover or visibility, which helps in reducing initial load times and improving performance.

By using QUIC, builder.io can demonstrate the performance capabilities of their system, especially in reducing JavaScript load and improving site responsiveness, which is crucial for their headless visual tool that integrates with various frameworks.

Builder.io is a headless visual tool, essentially a page builder that is unique because it can be installed via NPM and integrated directly into applications, allowing the registration of custom components for drag-and-drop functionality on websites.

Partytown is a feature developed by builder.io that helps in optimizing web performance by relocating third-party scripts into WebWorkers.

Miško Hevery
Miško Hevery
32 min
02 Jun, 2023

Comments

Sign in or register to post your comment.
Video Summary and Transcription
Mishko, the creator of Angular and AngularJS, discusses the challenges of website performance and JavaScript hydration. He explains the differences between client-side and server-side rendering and introduces Quik as a solution for efficient component hydration. Mishko demonstrates examples of state management and intercommunication using Quik. He highlights the performance benefits of using Quik with React and emphasizes the importance of reducing JavaScript size for better performance. Finally, he mentions the use of QUIC in both MPA and SPA applications for improved startup performance.

1. Introduction to Mishko and builder.io

Short description:

I am Mishko, the creator of Angular and AngularJS. Currently, I work on QUIC and serve as the CTO of builder.io, a headless visual tool that allows you to build pages by NPM installing it. We believe in open source and have developed PartyTown and Mitosis. Our open source team includes Adam Bradley, Manuel, and Sammy.

Wow, you know what? Nothing makes me happier than seeing a packed room. Like you guys are really, thank you. Like this is amazing. And I have to take a picture. So smile. All right.

Yes. I like to start my talks with a joke on programming, because I'm a dad, et cetera. So here's your joke of the day. How do you measure functions? Well, you measure them in para-meters. OK, good, good. Thank you, thank you, thank you.

So hi. I am Mishko. I did this thing called Angular, AngularJS. And now I work on QUIC. And I'm a CTO of builder.io. Builder.io is a headless visual tool. It's basically a page builder. But what's unique about it is you do it by NPM installing it, rather than using it as a service. And that means you can put it inside of your application. And you can register your own components, which means your marketing can drag and drag your own components on your website. And means they don't have to bug you about doing stuff for the UI.

We believe in open source. We do a couple of cool things. There is PartyTown for taking your third party scripts and moving them into WebWorkers. There's Mitosis, which allows you to write code once and generate canonical output for all the frameworks out there. We include everything from Angular to web components and every other letter in between. And this is our open source team. Adam Bradley, who worked on Ionic, Manuel, who worked on Gin, which is a Go framework, and Sammy who works on Mitosis.

2. The Problem with Website Performance

Short description:

Most websites are slow, and Google has developed Core Web Vitals to address this issue. However, most real websites are still in the red, indicating poor performance. It's crucial to improve website performance as it directly impacts bounce rates, completion rates, and revenue generation.

So anyway, let's talk about what I see the problem to be. And the problem we're trying to solve is that most websites are slow. And it's such a big problem that Google is really focusing on this, right? Google has developed this thing called Core Web Vitals. And if you look at Core Web Vitals, you're going to find something interesting, that most websites, real websites, I don't mean like talk hello world kind of site where you put up and say, look, I can make this thing performant. No, I'm talking about real websites. Most real websites are actually in the red. And few websites like Amazon that actually have the money and resources to go after it are actually in the yellow. And that's kind of strange because there's a lot of data that shows that, hey, the better performant website is, the less bounce rate you have, the more completion to purchase out, et cetera, the more money you can make. So clearly there is something going on where people know that web-based websites are important, but nobody seems to be able to get there.

QnA

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

A Guide to React Rendering Behavior
React Advanced 2022React Advanced 2022
25 min
A Guide to React Rendering Behavior
Top Content
This transcription provides a brief guide to React rendering behavior. It explains the process of rendering, comparing new and old elements, and the importance of pure rendering without side effects. It also covers topics such as batching and double rendering, optimizing rendering and using context and Redux in React. Overall, it offers valuable insights for developers looking to understand and optimize React rendering.
Building Better Websites with Remix
React Summit Remote Edition 2021React Summit Remote Edition 2021
33 min
Building Better Websites with Remix
Top Content
Remix is a web framework built on React Router that focuses on web fundamentals, accessibility, performance, and flexibility. It delivers real HTML and SEO benefits, and allows for automatic updating of meta tags and styles. It provides features like login functionality, session management, and error handling. Remix is a server-rendered framework that can enhance sites with JavaScript but doesn't require it for basic functionality. It aims to create quality HTML-driven documents and is flexible for use with different web technologies and stacks.
React Compiler - Understanding Idiomatic React (React Forget)
React Advanced 2023React Advanced 2023
33 min
React Compiler - Understanding Idiomatic React (React Forget)
Top Content
Watch video: React Compiler - Understanding Idiomatic React (React Forget)
Joe Savona
Mofei Zhang
2 authors
The Talk discusses React Forget, a compiler built at Meta that aims to optimize client-side React development. It explores the use of memoization to improve performance and the vision of Forget to automatically determine dependencies at build time. Forget is named with an F-word pun and has the potential to optimize server builds and enable dead code elimination. The team plans to make Forget open-source and is focused on ensuring its quality before release.
Full Stack Documentation
JSNation 2022JSNation 2022
28 min
Full Stack Documentation
Top Content
The Talk discusses the shift to full-stack frameworks and the challenges of full-stack documentation. It highlights the power of interactive tutorials and the importance of user testing in software development. The Talk also introduces learn.svelte.dev, a platform for learning full-stack tools, and discusses the roadmap for SvelteKit and its documentation.
React Concurrency, Explained
React Summit 2023React Summit 2023
23 min
React Concurrency, Explained
Top Content
Watch video: React Concurrency, Explained
React 18's concurrent rendering, specifically the useTransition hook, optimizes app performance by allowing non-urgent updates to be processed without freezing the UI. However, there are drawbacks such as longer processing time for non-urgent updates and increased CPU usage. The useTransition hook works similarly to throttling or bouncing, making it useful for addressing performance issues caused by multiple small components. Libraries like React Query may require the use of alternative APIs to handle urgent and non-urgent updates effectively.
SolidJS: Why All the Suspense?
JSNation 2023JSNation 2023
28 min
SolidJS: Why All the Suspense?
Top Content
Suspense is a mechanism for orchestrating asynchronous state changes in JavaScript frameworks. It ensures async consistency in UIs and helps avoid trust erosion and inconsistencies. Suspense boundaries are used to hoist data fetching and create consistency zones based on the user interface. They can handle loading states of multiple resources and control state loading in applications. Suspense can be used for transitions, providing a smoother user experience and allowing prioritization of important content.

Workshops on related topic

React Performance Debugging Masterclass
React Summit 2023React Summit 2023
170 min
React Performance Debugging Masterclass
Top Content
Featured WorkshopFree
Ivan Akulov
Ivan Akulov
Ivan’s first attempts at performance debugging were chaotic. He would see a slow interaction, try a random optimization, see that it didn't help, and keep trying other optimizations until he found the right one (or gave up).
Back then, Ivan didn’t know how to use performance devtools well. He would do a recording in Chrome DevTools or React Profiler, poke around it, try clicking random things, and then close it in frustration a few minutes later. Now, Ivan knows exactly where and what to look for. And in this workshop, Ivan will teach you that too.
Here’s how this is going to work. We’ll take a slow app → debug it (using tools like Chrome DevTools, React Profiler, and why-did-you-render) → pinpoint the bottleneck → and then repeat, several times more. We won’t talk about the solutions (in 90% of the cases, it’s just the ol’ regular useMemo() or memo()). But we’ll talk about everything that comes before – and learn how to analyze any React performance problem, step by step.
(Note: This workshop is best suited for engineers who are already familiar with how useMemo() and memo() work – but want to get better at using the performance tools around React. Also, we’ll be covering interaction performance, not load speed, so you won’t hear a word about Lighthouse 🤐)
Building WebApps That Light Up the Internet with QwikCity
JSNation 2023JSNation 2023
170 min
Building WebApps That Light Up the Internet with QwikCity
Featured WorkshopFree
Miško Hevery
Miško Hevery
Building instant-on web applications at scale have been elusive. Real-world sites need tracking, analytics, and complex user interfaces and interactions. We always start with the best intentions but end up with a less-than-ideal site.
QwikCity is a new meta-framework that allows you to build large-scale applications with constant startup-up performance. We will look at how to build a QwikCity application and what makes it unique. The workshop will show you how to set up a QwikCitp project. How routing works with layout. The demo application will fetch data and present it to the user in an editable form. And finally, how one can use authentication. All of the basic parts for any large-scale applications.
Along the way, we will also look at what makes Qwik unique, and how resumability enables constant startup performance no matter the application complexity.
Back to the Roots With Remix
React Summit 2023React Summit 2023
106 min
Back to the Roots With Remix
Featured Workshop
Alex Korzhikov
Pavlik Kiselev
2 authors
The modern web would be different without rich client-side applications supported by powerful frameworks: React, Angular, Vue, Lit, and many others. These frameworks rely on client-side JavaScript, which is their core. However, there are other approaches to rendering. One of them (quite old, by the way) is server-side rendering entirely without JavaScript. Let's find out if this is a good idea and how Remix can help us with it?
Prerequisites- Good understanding of JavaScript or TypeScript- It would help to have experience with React, Redux, Node.js and writing FrontEnd and BackEnd applications- Preinstall Node.js, npm- We prefer to use VSCode, but also cloud IDEs such as codesandbox (other IDEs are also ok)
Next.js 13: Data Fetching Strategies
React Day Berlin 2022React Day Berlin 2022
53 min
Next.js 13: Data Fetching Strategies
Top Content
WorkshopFree
Alice De Mauro
Alice De Mauro
- Introduction- Prerequisites for the workshop- Fetching strategies: fundamentals- Fetching strategies – hands-on: fetch API, cache (static VS dynamic), revalidate, suspense (parallel data fetching)- Test your build and serve it on Vercel- Future: Server components VS Client components- Workshop easter egg (unrelated to the topic, calling out accessibility)- Wrapping up
React Performance Debugging
React Advanced 2023React Advanced 2023
148 min
React Performance Debugging
Workshop
Ivan Akulov
Ivan Akulov
Ivan’s first attempts at performance debugging were chaotic. He would see a slow interaction, try a random optimization, see that it didn't help, and keep trying other optimizations until he found the right one (or gave up).
Back then, Ivan didn’t know how to use performance devtools well. He would do a recording in Chrome DevTools or React Profiler, poke around it, try clicking random things, and then close it in frustration a few minutes later. Now, Ivan knows exactly where and what to look for. And in this workshop, Ivan will teach you that too.
Here’s how this is going to work. We’ll take a slow app → debug it (using tools like Chrome DevTools, React Profiler, and why-did-you-render) → pinpoint the bottleneck → and then repeat, several times more. We won’t talk about the solutions (in 90% of the cases, it’s just the ol’ regular useMemo() or memo()). But we’ll talk about everything that comes before – and learn how to analyze any React performance problem, step by step.
(Note: This workshop is best suited for engineers who are already familiar with how useMemo() and memo() work – but want to get better at using the performance tools around React. Also, we’ll be covering interaction performance, not load speed, so you won’t hear a word about Lighthouse 🤐)
High-performance Next.js
React Summit 2022React Summit 2022
50 min
High-performance Next.js
Workshop
Michele Riva
Michele Riva
Next.js is a compelling framework that makes many tasks effortless by providing many out-of-the-box solutions. But as soon as our app needs to scale, it is essential to maintain high performance without compromising maintenance and server costs. In this workshop, we will see how to analyze Next.js performances, resources usage, how to scale it, and how to make the right decisions while writing the application architecture.