Display all the tags (and their category) of a single recipe.
Last updated: Feb 10, 2021
My project is a recipe-app in React and I want to display all the tags (and their category) of a single recipe.I just can’t figure out how to write the schema’s. When I inspect the document of the recipe, I only get _key and _ref. What did I do wrong?
Feb 10, 2021, 2:03 PM
Hi Pieter, this is correct - the
is to give each array item a unique identifier and the
is the ID of the referenced document. To show these references in your React app, you will need to use the dereferencing operator
to join them in your query. For example, if you're using GROQ: