From 8b564b245aad5d7207178dab685dcf0826cadd6f Mon Sep 17 00:00:00 2001 From: sherwinski Date: Thu, 27 Jan 2022 19:46:24 -0500 Subject: [PATCH] docs: make example more clear that it is contained within a react component --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 727ab864..247c48e2 100644 --- a/README.md +++ b/README.md @@ -287,8 +287,8 @@ returns something similar to: **Note**: Certain fields under `attributes` are returned as strings to provide better [resiliency](https://forums.fauna.com/t/how-to-store-arbitrary-json-object-via-graphql/142/3) when used with GraphQL. Therefore, these fields (`custom_fields`, `tags`, `colors.dominant_colors`) will need to be parsed back into JSON objects after being queried. The example below demonstrates how to do this: ```js -{ - data.allContentfulArticle.edges.map(({ node }) => ( +export default function Page({ data }) { + return data.allContentfulArticle.edges.map(({ node }) => (