Qwik React Integration
Yes, Qwik can load React components!
Unlike Next and other React meta-frameworks there is no clear distinction between client and server components
There are only components and interactivity is configured with an eagerness property.
Qwik effectively acts as a fullstack metaframework for React. You can read more about how this magic works in the offical docs
React Greeting Component
This is a React component wrapped in qwikify$(). By default it renders on the server.
Qwik can render React components on server and update them on the client without any bootstrap code!
It doesnt have server components or client components and doesnt have "use client". It can do both!
Component pre-rendered on server. Hover to re-render on client
Simple React Counter component
The client-side Javascript in the useEffect[] won't load until hover!
The reason this works is because they component is set to load on hover. This is only one of the directives available to control the loading of React (and other) components
Pre-rendered on the server. Javascript not loaded. Hover to load!
This next example is intercommunication between React components (islands) using signals
The button and the display are two separate React islands that communicate using signals
They can just as easily communicate with Qwik components for a seamless integration
React components can be used where they are needed (i.e. integration with the ecosystem) allowing progressive adoption between frameworks
Count: 0
This component loads Material ui tabs. It only loads javascript on hover
Selected tab: 0
Slider Component
This re-exports a MUI Component as a Qwik component and sets eagerness to add interactivity on hover