Better Programming

Advice for programmers.

Follow publication

Member-only story

Introducing Qwik — The JavaScript Framework With O(1) Load Time

Jennifer Fu
Better Programming
Published in
12 min readOct 17, 2022
Image generated by DALL-E 2

Introduction

Websites send JavaScript to the browser to provide interactivity. The amount of JavaScript downloaded to the browser is going up every year, as the complexity of websites goes up. Most JavaScript frameworks download and execute all of the code at once. It ends up load time getting slower, because the load time is O(n).

Qwik is a JavaScript framework that lazily downloads code as a user interacts. It aims to have instant-on applications, even on mobile devices. It achieves the goal through two main strategies:

  • Delay execution and download of JavaScript (except the start code, about 1KB) for as long as possible.
  • Serialize the execution state of the application and the framework on the server and resume it on the client.

Qwik is not React, although it looks similar to React, and uses JSX. It offers the fastest possible page load time regardless of the complexity of a website. Its load time is O(1).

Install and Run Qwik

Run the following command to install Qwik:

% npm create qwik@latest

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Write a response