I am working on a basic website currently and having a bit of a blocker when it comes to data fetching.
In my root layout, I have a Header and Footer component. In my CMS I have a "Settings" global.
Both the Header and the Footer need data from Settings to render. Initially, before I had the Footer, I just did my data fetching for settings inside the Header component.
Now I need both components to access the data I am not sure what to do. I could do the data fetching in the layout file and pass it as props but I have read that I shouldn't be doing this?
I could also do the data fetching for each component individually but this seems redundant and not the right way to go about it.
Any insight would be useful, thank you!