What is Astro and why you should consider using it to build your website

Astro is one of the most notable projects of the year. Astro is a tool to build web sites that load faster because they ship less JavaScript.

Risingstars

How can you build a faster website?

To build a faster website you need to ship less code. Astro is a kind of static site builder that delivers lightning-fast performance with a modern developer experience.

With Astro you can build your site using your own framework like React, Vue or just HTML and JavaScript. Astro then renders the entire page to static HTML, removing all JavaScript from your final build by default.

If there is a real need for some Javscript component, Astro loads it when it’s visible.

It supports all the npm packages, CSS modules etc and is SEO enabled.

How it works?

Astro works like a static site generator which means it will generate a static HTML site for you during build, with almost no Javascript. It’s pretty obvious that this will be much faster compared to a site with Javascript.

When a component, like add to cart or carousel, needs some JavaScript, it loads that component. The rest of your site continues to exist as static, lightweight HTML. This new approach to web architecture is called islands architecture.

Sample project is available at Github – https://github.com/ankur-srivastava/astro-blog

Author: Ankur

I am Enthusiastic about Learning new things and sharing my Knowledge. I like programming and have a pretty good background in Computer Science.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: