Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Make note of reserved names in context object #12423

Closed
marcysutton opened this issue Mar 8, 2019 · 0 comments
Closed

Docs: Make note of reserved names in context object #12423

marcysutton opened this issue Mar 8, 2019 · 0 comments
Labels
type: documentation An issue or pull request for improving or updating Gatsby's documentation

Comments

@marcysutton
Copy link
Contributor

marcysutton commented Mar 8, 2019

Summary

Document some of the reserved words in React context, as requested in #11787. This page looks like a good spot for it: https://www.gatsbyjs.org/docs/creating-and-modifying-pages/

Basic example

From the PR:

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

 > **NOTE:** There are a few reserved names that _cannot_ be used in `context`. They are: `path`, `matchPath`, `component`, `componentChunkName`, `pluginCreator___NODE`, and `pluginCreatorId`.

Motivation

To document this in more places than the "Why GraphQL" doc, so that people don't stumble over this issue as often.

@gatsbot gatsbot bot added the type: documentation An issue or pull request for improving or updating Gatsby's documentation label Mar 8, 2019
marcysutton pushed a commit that referenced this issue Mar 8, 2019
calcsam pushed a commit that referenced this issue Mar 9, 2019
<!--
  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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: documentation An issue or pull request for improving or updating Gatsby's documentation
Projects
None yet
Development

No branches or pull requests

1 participant