With the growth of size and complexity of single-page applications, the initial load time of websites has been steadily growing. This can be especially problematic for consumer-facing sites where long load times can lead to lost customers.
Qwik uses asynchronous, out-of-order component hydration to ensure that the first interaction can happen much quicker. This means that Qwik will lazy load and render only the components that are needed.
After Qwik pre-renders the application on the server, it will determine that the only interactive element is myButton and will only download/re-render it. The rest of the components are static, so Qwik avoids the extra effort of downloading and rendering them.
QRL or “Qwik Resource Locator“ is the syntax Qwik uses in order to connect resources. In our example, on:click will contain the path (filename + function name), and Qwik could determine the exact code required for the button click operation.
On the client-side, the process is managed through qwikloader, a tiny (<1k) library that orchestrates loading the necessary code and connecting it to the right events.