-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
fix(docs): add example for pageContext usage within a page #11580
Conversation
This page explains very well that you can pass `context` to a page automatically created, but it's missing an example of how to use it in a page via `pageContext`. I think it is important to explicitly explain it because the name of the variable is different to the prop name. I didn't find any related issues.
Co-Authored-By: guayom <guayo.mena@gmail.com>
Oops, missed the jsx... Do I need to squash? |
@guayom no need! If you're able, can you fix the linter? In the root of your repo, should be npx prettier --write docs/docs/creating-and-modifying-pages.md |
:S Sorry, I didn't understand that part. Should I modify a file or run that command? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed it for you! Thanks for the PR 🎉
Holy buckets, @guayom — we just merged your PR to Gatsby! 💪💜 Gatsby is built by awesome people like you. Let us say “thanks” in two ways:
If there’s anything we can do to help, please don’t hesitate to reach out to us: tweet at @gatsbyjs and we’ll come a-runnin’. Thanks again! |
Oh! Gotcha! I did the change from the UI, but now I see that the next time it's best to download the repo and run the linter before commiting. Thanks for your help and for working on this amazing software! |
Now you helped too :) Thanks for your help, we appreciate it! |
Description
This page explains very well that you can pass
context
to a page automatically created, but it's missing an example of how to use it in a page viapageContext
. I think it is important to explicitly explain it because the name of the variable is different to the prop name.I added an example.
Related Issues
I didn't find any related issues.