# Astro with Nano Stores

import DocButton from '~/components/webkit/DocButton.vue';
import SectionBasicContent from '~/components/SectionBasicContent/SectionBasicContent.vue';
import Container from '~/components/webkit/Container.vue';

<SectionBasicContent
  description="The Astro with Nano Stores template showcases Astro's built-in support for nanostores to provide a shared state between components of any framework. This template demonstrates how to implement a lightweight, framework-agnostic state management solution that works seamlessly across different UI frameworks while maintaining optimal performance."
  buttons={[
    { label: "Deploy template", link: "https://console.azion.com/create/astro/astro-with-nanostores", outlined: false, icon: "ai ai-azion", iconPos: "left" },
    { label: "View demo", link: "https://tqxc7pjft3.map.azionedge.net/", severity: "secondary" }
  ]}
>
  <Fragment slot="content">
    <div style="flex: 1; min-width: 300px;">
      | Item | Details |
      |:----------|:------|
      | Repository | [Azion Samples](https://github.com/aziontech/azion-samples/tree/dev/templates/astro/astro-with-nanostores) |
      | Framework | [Astro](/en/documentation/products/devtools/azion-edge-runtime/frameworks-compatibility/astro/) |
      | Use Case | E-commerce|
    </div>
    <div style="display: flex; justify-content: center; align-items: center; flex: 1;">
      <img src="/assets/docs/images/uploads/template-showcase/astro/astro-nanostores.png" width="400" alt="Astro markdown with shiki" style="min-width: 100%; max-width: 100%; height: auto;" />
    </div>
  </Fragment>
</SectionBasicContent>

## About this template

This template is built with [Astro](/en/documentation/products/devtools/azion-edge-runtime/frameworks-compatibility/astro/) and integrates Nano Stores, a tiny state management library that keeps data in sync across components written in any framework. It's a great fit for interactive features like shopping carts, where the same state must be shared between separate islands. Deployed on Azion, it's served via a distributed architecture for fast, globally distributed delivery.

## Key features

- Framework-agnostic shared state powered by Nano Stores
- Tiny runtime footprint that keeps client bundles small
- Reactive stores that stay in sync across independent Astro islands
- Edge-optimized delivery through Azion for low-latency access worldwide