Fireship · @fireship

Qwik… the world's first O(1) JavaScript framework?

Uploaded September 20, 2022 · Length 3:33

Qwik… the world's first O(1) JavaScript framework?

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.

  1. 0:01

    it is september 20th 2022 and you're

  2. 0:04

    watching the code report it's time to

  3. 0:06

    reset the counter yet again it's been

  4. 0:08

    zero days since a new javascript

  5. 0:09

    framework has been released the highly

  6. 0:11

    anticipated quick framework built by a

  7. 0:13

    dream team of developers just hit beta

  8. 0:15

    yesterday now before you go and change

  9. 0:17

    the channel this isn't just another

  10. 0:18

    average five inch framework it brings an

  11. 0:20

    entirely new rendering paradigm to the

  12. 0:22

    table called resumability which totally

  13. 0:24

    eliminates the need for hydration the

  14. 0:26

    technique used by almost every meta

  15. 0:27

    framework today to make server rendered

  16. 0:29

    websites fully interactive to understand

  17. 0:31

    what makes quick special we first need

  18. 0:33

    to understand the problem with the

  19. 0:34

    current generation of frameworks the key

  20. 0:36

    to a perfect lighthouse performance

  21. 0:37

    score is to use less javascript google

  22. 0:39

    did some science and found that making a

  23. 0:41

    website 20 faster results in ten percent

  24. 0:44

    more conversions if your website makes a

  25. 0:46

    thousand dollars a year that could be

  26. 0:47

    like ten dollars you're leaving on the

  27. 0:48

    table the catch-22 of web development is

  28. 0:50

    that in order to implement the features

  29. 0:52

    your customers want you need more

  30. 0:53

    javascript but in order to make your

  31. 0:55

    site fast you need less javascript like

  32. 0:57

    in next.js for example you start with

  33. 0:59

    about 70 kilobytes of javascript out of

  34. 1:01

    the gate thanks to react-dom you'll then

  35. 1:03

    add at least a couple hundred more

  36. 1:04

    kilobytes to that with your own

  37. 1:06

    application code that will scale of

  38. 1:08

    based on how much application code you

  39. 1:09

    have on the page that's because on the

  40. 1:11

    initial page load the framework needs to

  41. 1:13

    hydrate the dom and rebuild or bootstrap

  42. 1:15

    the entire component tree from the

  43. 1:17

    ground up it's kind of like watching a

  44. 1:18

    movie that can't be paused if you need

  45. 1:20

    to restart the application by hitting

  46. 1:22

    the refresh button in the browser it

  47. 1:23

    needs to re-execute all the javascript

  48. 1:25

    from the beginning to get back to where

  49. 1:26

    it was refresh damp refresh damn

  50. 1:29

    frameworks like astro have recognized

  51. 1:31

    this problem which uses a technique

  52. 1:33

    called partial hydration to selectively

  53. 1:34

    hydrate the dom but quick cuts out

  54. 1:36

    hydration altogether like it's just not

  55. 1:38

    even necessary it delivers html that's

  56. 1:41

    instantly interactive that means in

  57. 1:42

    theory you should be able to achieve a

  58. 1:44

    perfect lighthouse performance score no

  59. 1:46

    matter how big and complex your

  60. 1:47

    javascript code base is that sounds too

  61. 1:50

    good to be true so how is it even

  62. 1:51

    possible the key innovation here is that

  63. 1:53

    a quick app can be fully serialized as

  64. 1:55

    html in other words at any moment you

  65. 1:58

    can hit the pause button and capture all