Fireship · @fireship
Qwik… the world's first O(1) JavaScript framework?
Uploaded September 20, 2022 · Length 3:33
Summary
Qwik framework eliminates hydration for faster server-side rendering and interactive websites.
- javascript framework
- qwik framework
- resumability
- lazy loading
- server-side rendering
Transcript preview
The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.
- 0:01
it is september 20th 2022 and you're
- 0:04
watching the code report it's time to
- 0:06
reset the counter yet again it's been
- 0:08
zero days since a new javascript
- 0:09
framework has been released the highly
- 0:11
anticipated quick framework built by a
- 0:13
dream team of developers just hit beta
- 0:15
yesterday now before you go and change
- 0:17
the channel this isn't just another
- 0:18
average five inch framework it brings an
- 0:20
entirely new rendering paradigm to the
- 0:22
table called resumability which totally
- 0:24
eliminates the need for hydration the
- 0:26
technique used by almost every meta
- 0:27
framework today to make server rendered
- 0:29
websites fully interactive to understand
- 0:31
what makes quick special we first need
- 0:33
to understand the problem with the
- 0:34
current generation of frameworks the key
- 0:36
to a perfect lighthouse performance
- 0:37
score is to use less javascript google
- 0:39
did some science and found that making a
- 0:41
website 20 faster results in ten percent
- 0:44
more conversions if your website makes a
- 0:46
thousand dollars a year that could be
- 0:47
like ten dollars you're leaving on the
- 0:48
table the catch-22 of web development is
- 0:50
that in order to implement the features
- 0:52
your customers want you need more
- 0:53
javascript but in order to make your
- 0:55
site fast you need less javascript like
- 0:57
in next.js for example you start with
- 0:59
about 70 kilobytes of javascript out of
- 1:01
the gate thanks to react-dom you'll then
- 1:03
add at least a couple hundred more
- 1:04
kilobytes to that with your own
- 1:06
application code that will scale of
- 1:08
based on how much application code you
- 1:09
have on the page that's because on the
- 1:11
initial page load the framework needs to
- 1:13
hydrate the dom and rebuild or bootstrap
- 1:15
the entire component tree from the
- 1:17
ground up it's kind of like watching a
- 1:18
movie that can't be paused if you need
- 1:20
to restart the application by hitting
- 1:22
the refresh button in the browser it
- 1:23
needs to re-execute all the javascript
- 1:25
from the beginning to get back to where
- 1:26
it was refresh damp refresh damn
- 1:29
frameworks like astro have recognized
- 1:31
this problem which uses a technique
- 1:33
called partial hydration to selectively
- 1:34
hydrate the dom but quick cuts out
- 1:36
hydration altogether like it's just not
- 1:38
even necessary it delivers html that's
- 1:41
instantly interactive that means in
- 1:42
theory you should be able to achieve a
- 1:44
perfect lighthouse performance score no
- 1:46
matter how big and complex your
- 1:47
javascript code base is that sounds too
- 1:50
good to be true so how is it even
- 1:51
possible the key innovation here is that
- 1:53
a quick app can be fully serialized as
- 1:55
html in other words at any moment you
- 1:58
can hit the pause button and capture all


