Relative Content

Tag Archive for astrojs

Looping through an array in an AstroJS component

I try to loop an array in an Astro.js component, but it doesn’t return anything: In my example, I replaced the cards const from Astro.props with a hardcoded one for readability. I don’t get anything from the forEach loop, but the Card component at the end is displayed correctly.

AstroJs – astro images not displaying when site proxied through CDN after upgrade to Astro V5

Referenced images contained within the src folder display when navigating to the website from the server itself which ignores the CDN. When navigating normally from a browser off the server (passing through CDN), these images do not display. They will display after I navigate to the page with the image on the server itself. This seems to have occurred with upgrade of Astro from V4 to V5 (latest).

تكليفات JavaScript Bootcamp على جميع الدروس

لدينا Function بإسم Repeat في اللغة تقوم بعمل تكرار للنصوص
نريد عمل Function تقوم بنفس الوظيفة بإسم elzeroRepeat
شاهد المثال والنتيجة وقم بعمل ال Function وإضافتها لل String Functions

Best way to share fetched data in astro js

I have many pages and components at different levels that use data from the same API fetched at build time. What is the best way to do this in astro js: perform a separate fetch in each component and page or is there a way to make a request in some higher level component and then share the results among pages and components?