Acelerando Tu Aplicación React Con Menos Javascript

Rate this content
Bookmark

¿Demasiado JavaScript te está agobiando? Los nuevos marcos que prometen no usar JavaScript parecen interesantes, pero tienes una aplicación React existente que mantener. ¿Y si Qwik React es tu respuesta para un inicio de aplicaciones más rápido y una mejor experiencia de usuario? Qwik React te permite convertir fácilmente tu aplicación React en una colección de islas, que pueden ser SSR y retrasar la hidratación, y en algunos casos, omitir la hidratación por completo. Y todo esto de manera incremental sin una reescritura.

Miško Hevery
Miško Hevery
15 min
23 Oct, 2023

Comments

Sign in or register to post your comment.

Video Summary and Transcription

Quick React es una herramienta que acelera las aplicaciones React con menos JavaScript, y Builder.io es un CMS visual que empodera a los equipos de marketing. El rendimiento web es un desafío, con la mayoría de los sitios web obteniendo puntuaciones bajas. La arquitectura de islas y la razonabilidad son enfoques alternativos a la hidratación que mejoran el rendimiento. QUIC permite aplicaciones reanudables y Quick React habilita la arquitectura de islas para tiempos de inicio más rápidos. La hidratación y la comunicación entre islas son cruciales para la interactividad en las aplicaciones React.

Available in English

1. Introducción a Quick React

Short description:

Hablemos de Quick React y cómo puede acelerar tu aplicación React con menos JavaScript. Builder.io es un CMS visual sin cabeza que te permite registrar componentes React existentes y potenciar a tu equipo de marketing con un editor visual. Builder.io también ofrece Partytown, que ejecuta código de terceros en trabajadores web, y Mitosis, que genera código idiomático para diferentes marcos.

Hablemos de Quick React, y específicamente cómo acelerar tu aplicación React con menos JavaScript.

Hola, mi nombre es Misko Hevery, soy CTO en Builder.io y he construido estos proyectos anteriores llamados Angular, y hoy estoy trabajando en un proyecto llamado Quick, y quiero específicamente mostrarte cómo Quick puede ser utilizado para convertir las aplicaciones React en islas más pequeñas y cargar más rápido.

Así que trabajo para Builder.io, Builder.io es un CMS visual headless. Lo que significa es que puedes tomar tu aplicación React existente y hacer npm install builder en ella, y una vez que instales builder, puedes registrar los componentes existentes de React en tus aplicaciones que tienes, y eso permite a tu equipo de marketing tener un editor visual y pueden arrastrar y soltar tus componentes en la página, y a partir de los componentes ellos pueden cambiar cosas, programar cuándo las cosas se ponen en marcha, publicar y enviar los datos al sitio web. Así que no tienes que, como ingeniero, estar involucrado en cada pequeño cambio.

Tenemos un increíble equipo de contribuyentes de código abierto. En primer lugar, a Builder.io le encanta el código abierto, así que además de Quick, tenemos Partytown, que proporciona una forma de ejecutar código de terceros, como Google Analytics, dentro del trabajador web, lo que libera el hilo principal para manejar la aplicación, hace que la aplicación sea más receptiva. También tenemos Mitosis, que te permite escribir tus componentes en un estilo, y luego esos componentes se traducen a todos los frameworks existentes. Así que si tienes una empresa donde hay muchos equipos usando diferentes frameworks y quieres tener sistemas de diseño comunes en todos, Mitosis es una forma de hacerlo. Lo que hay que entender sobre Mitosis es que no es un envoltorio, sobre los web components existentes o algo así. En realidad genera código idiomático para todos los diferentes frameworks. Y por supuesto, tenemos a estos tres caballeros increíbles que están trabajando en el código abierto, Adam Bradley, quien es creador de Ionic, Manu Martinez, Almeda, quien también trabajó en Ionic y GEN, y finalmente, Sam Jaber, quien está trabajando en Mitosis.

2. Desafíos con el Rendimiento Web

Short description:

Nuestra web es increíble, pero no es tan rápida como debería ser. Google puntúa los sitios web basándose en la experiencia del usuario, y la mayoría de los sitios web obtienen una puntuación en rojo. Es difícil lograr un buen rendimiento.

Ahora, lo que quiero hablarles es que nuestra web es increíble, pero no es tan rápida como debería ser. Y a Google le importa esto, y ven que los usuarios abandonan los sitios que no rinden tan bien. Así que Google puntúa los sitios web, y tienen algo llamado Core web vitals. Y esto se registra en base a qué tipo de experiencia de usuario tienen las personas cuando usan el navegador Chrome. Y como puedes ver, la mayoría de los sitios web obtienen una puntuación en rojo. Solo los sitios web que dedican la mayor cantidad de tiempo y energía pueden obtener amarillo, y casi ningún sitio web, en realidad, que he visto en producción que tienen tráfico real logran obtener verde. Entonces, ¿qué está pasando? ¿Por qué es tan difícil obtener un buen rendimiento? Bueno, si miras la cantidad de JavaScript que se ha enviado al cliente a lo largo de los años, puedes ver que está aumentando constantemente.

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 Conference 2022React Advanced Conference 2022
25 min
A Guide to React Rendering Behavior
Top Content
React is a library for "rendering" UI from components, but many users find themselves confused about how React rendering actually works. What do terms like "rendering", "reconciliation", "Fibers", and "committing" actually mean? When do renders happen? How does Context affect rendering, and how do libraries like Redux cause updates? In this talk, we'll clear up the confusion and provide a solid foundation for understanding when, why, and how React renders. We'll look at: - What "rendering" actually is - How React queues renders and the standard rendering behavior - How keys and component types are used in rendering - Techniques for optimizing render performance - How context usage affects rendering behavior| - How external libraries tie into React rendering
Speeding Up Your React App With Less JavaScript
React Summit 2023React Summit 2023
32 min
Speeding Up Your React App With Less JavaScript
Top Content
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.
React Concurrency, Explained
React Summit 2023React Summit 2023
23 min
React Concurrency, Explained
Top Content
React 18! Concurrent features! You might’ve already tried the new APIs like useTransition, or you might’ve just heard of them. But do you know how React 18 achieves the performance wins it brings with itself? In this talk, let’s peek under the hood of React 18’s performance features: - How React 18 lowers the time your page stays frozen (aka TBT) - What exactly happens in the main thread when you run useTransition() - What’s the catch with the improvements (there’s no free cake!), and why Vue.js and Preact straight refused to ship anything similar
The Future of Performance Tooling
JSNation 2022JSNation 2022
21 min
The Future of Performance Tooling
Top Content
Our understanding of performance & user-experience has heavily evolved over the years. Web Developer Tooling needs to similarly evolve to make sure it is user-centric, actionable and contextual where modern experiences are concerned. In this talk, Addy will walk you through Chrome and others have been thinking about this problem and what updates they've been making to performance tools to lower the friction for building great experiences on the web.
Optimizing HTML5 Games: 10 Years of Learnings
JS GameDev Summit 2022JS GameDev Summit 2022
33 min
Optimizing HTML5 Games: 10 Years of Learnings
Top Content
The open source PlayCanvas game engine is built specifically for the browser, incorporating 10 years of learnings about optimization. In this talk, you will discover the secret sauce that enables PlayCanvas to generate games with lightning fast load times and rock solid frame rates.
When Optimizations Backfire
JSNation 2023JSNation 2023
26 min
When Optimizations Backfire
Top Content
Ever loaded a font from the Google Fonts CDN? Or added the loading=lazy attribute onto an image? These optimizations are recommended all over the web – but, sometimes, they make your app not faster but slower.
In this talk, Ivan will show when some common performance optimizations backfire – and what we need to do to avoid that.

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.
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 Conference 2023React Advanced Conference 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 🤐)
Maximize App Performance by Optimizing Web Fonts
Vue.js London 2023Vue.js London 2023
49 min
Maximize App Performance by Optimizing Web Fonts
WorkshopFree
Lazar Nikolov
Lazar Nikolov
You've just landed on a web page and you try to click a certain element, but just before you do, an ad loads on top of it and you end up clicking that thing instead.
That…that’s a layout shift. Everyone, developers and users alike, know that layout shifts are bad. And the later they happen, the more disruptive they are to users. In this workshop we're going to look into how web fonts cause layout shifts and explore a few strategies of loading web fonts without causing big layout shifts.
Table of Contents:What’s CLS and how it’s calculated?How fonts can cause CLS?Font loading strategies for minimizing CLSRecap and conclusion
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.