Skip to content

Blog

Explore my thoughts, tutorials and tips on web development.

Don't prerend as static HTML with Astro

In Astro, setting export const prerender = false; in a page or component file prevents it from being prerendered as static HTML during the build process. Here's when you should consider using this option

Template Directives "client:load"

In Astro, client:load is a directive used to control when a client-side component should be hydrated and run its JavaScript on the client. Setting client:load on a component instructs Astro to load and hydrate the component immediately after the initial HTML is loaded. This is useful when you need interactivity on a component right away.