Skip to content

Commit

Permalink
document reserved words in React context (#12424)
Browse files Browse the repository at this point in the history
<!--
  Have any questions? Check out the contributing docs at https://gatsby.dev/contribute, or
  ask in this Pull Request and a Gatsby maintainer will be happy to help :)
-->

## Description

Documenting limitations with React context, as per the feedback/comments in #11787.

Closes #12423
  • Loading branch information
marcysutton authored and calcsam committed Mar 9, 2019
1 parent 91819a8 commit 0173f6b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/docs/creating-and-modifying-pages.md
Expand Up @@ -39,8 +39,12 @@ your sites development server at `HOST:PORT/___graphql` e.g.
}
```

The `context` property accepts an object, and we can pass in any data we want the page to be able to access.

You can also query for any `context` data you or plugins added to pages.

> **NOTE:** There are a few reserved names that _cannot_ be used in `context`. They are: `path`, `matchPath`, `component`, `componentChunkName`, `pluginCreator___NODE`, and `pluginCreatorId`.
## Creating pages in gatsby-node.js

Often you will need to programmatically create pages. For example, you have
Expand Down

0 comments on commit 0173f6b

Please sign in to comment.