#What is the better option?

2 messages · Page 1 of 1 (latest)

native burrow
#

I’m trying to decide the best approach for handling data in my project and need some advice. Which method would be better:

Use index.astro to pull data from JSON, then pass that data into props, and finally provide the prop data to the component like this: <Page content={JsonDataForPage1} />
or

Pull the data directly on the page and then render it?

So pull the json again on the page and select the tag.

carmine pine
#

For a clean and scalable approach, especially in larger projects, using index.astro to manage data and pass it as props is generally better.