First off, Frontity is great so far and it’s only getting better the more I understand the concepts.
I’m clearly getting confused with the process of fetching data, however.
I have an ACF field which includes a repeater of references to posts, as well as a background image. I’ve been able to get the data for the background image without issues, but now I want to get the data from the referenced post.
I thought I could fetch the data by doing:
const data = state.source.post[sample.ID]; (where
sample.ID is a number like 51 — I’ve confirmed that the document ID is correct)
However when I log this out I get undefined…
You can see the full source here:
What am I doing wrong?