What are the recommended Node.js versions for running Waku projects?
Waku projects require Node.js version ^24.0.0, ^22.12.0, or ^20.19.0. Ensuring your environment meets these requirements will allow for proper development and deployment.
How does Waku handle server-client boundaries with the 'use client' directive?
The 'use client' directive establishes a server-client boundary when a client component is imported into a server component. All components imported below this boundary are then hydrated and executed in the browser, enabling traditional React features like state and event handlers.
Can client components import server components directly in Waku?
Client components cannot directly import server components. However, client components can accept server components as props, such as children, which allows for patterns like adding global context providers.
What rendering options does Waku provide for layouts and pages?
Waku offers both static prerendering (SSG) and server-side rendering (SSR) for layouts and pages. These options apply to all server and client components within the application.
How does Waku's approach to client components affect bundle size compared to traditional React frameworks?
Even with minimal optimization towards server components, Waku aims to produce smaller client bundle sizes. This is because traditional React frameworks typically treat all components as 100% client components, while Waku leverages server components to reduce the client-side footprint.
What types of applications is Waku best suited for, and are there any limitations for larger projects?
Waku is designed for marketing sites, headless commerce, and web apps, offering a lightweight and enjoyable developer experience. For large enterprise applications, a heavier framework might be more suitable.