Why I like Astro
Our website at Contenda is built with Astro! It has quickly become one of my favorite frameworks. Here’s why!
-
Comfortably Familiar: Astro doesn’t require you to learn new lifecycle methods or other complex concepts. It brings back the simplicity of web development, reminiscent of when we all started dabbling with HTML and CSS. You can build with plain old HTML and CSS and add other stuff as needed.
-
Flexibility: Want to use React or Svelte for certain components on your page? You can do that with Astro. It allows you to pull in different libraries and frameworks, giving you the flexibility to use the tools you prefer.
-
Minimalist by Design: Astro is intentionally minimal. It only runs certain things when you tell it to, which helps to avoid unnecessary bloat on your page. This design philosophy aligns with the idea of making websites faster by not adding too much rather than trying to optimize heavy pages.
-
File-based Routing: Astro does file-based routing, which means you just add the page to the folder and it’s done. You can make your app as React-heavy as you want without having to set up routing.
-
Server-side Rendering (SSR) and Static Generation: Astro supports both SSR and static generation. Whether you prefer to upload something to a CDN or want to handle things server-side, Astro has you covered.
-
Built-in Pagination: Astro has a built-in function called getStaticPaths that creates static paths based on whatever function you pass into it. This means you can create and paginate through pages with ease.
Astro brings a lot of exciting features to the table, offering a blend of simplicity, flexibility, and performance. It’s a tool that certainly warrants your attention if you’re in the web development space.
As always, I’m open to discussions and answering any questions you might have about Astro. Let’s explore this new framework together!