How can I fetch data from a dynamic zone and display it in react?

I did this tutorial: https://strapi.io/blog/build-a-blog-with-react-strapi-and-apollo but the api has changed.
In the past you could fetch via graphql the content property of an article and display it in ReactMarkdown component.

Now the graphql api provides a field named blocks: [ArticleBlocksDynamicZone].

How can I fetch data from a dynamic zone and display it in react?

Is there a good tutorial somewhere?

If you want to fetch dynamic zone with graphql you need to use this:


files is the dynamic zone. And then you can use the apollo react to fetch the data.
Strapi graphql documentation
Apollo Client documentation

1 Like