Files
main/rules-v0-deprecated/javascript-astro-tailwind-css-cursorrules-prompt-f/astro-data-fetching.mdc
T
2025-03-03 23:40:27 +05:30

10 lines
378 B
Plaintext

---
description: Rules for data fetching in Astro using Astro.props, getStaticPaths(), and Astro.glob().
globs: src/**/*.*
---
Data Fetching
- Use Astro.props for passing data to components.
- Implement getStaticPaths() for fetching data at build time.
- Use Astro.glob() for working with local files efficiently.
- Implement proper error handling for data fetching operations.