#Store data globally in project
3 messages · Page 1 of 1 (latest)
Hi @ornate needle. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
Yes, you can use Nano Stores to share state between components in your Astro project. Nano Stores is a lightweight, framework-agnostic library that allows you to create stores that any component can interact with. Astro recommends Nano Stores for sharing client-side storage in an islands architecture / partial hydration (https://docs.astro.build/en/concepts/islands/) setup.
You can find more information about Nano Stores and why Astro recommends it in the Sharing State documentation (https://docs.astro.build/en/core-concepts/sharing-state).