Gatsby: Change prop name "pathContext" to "pageContext"

Created on 10 Jul 2017  路  4Comments  路  Source: gatsbyjs/gatsby

This when creating pages you can add a context key. All data passed there is passed into pages as pathContext. I think pageContext is a more intuitive name as its context for the "page" which is the main object not "path", an attribute of the page.

Since we're at 1.0, we can just pass in both and then remove pathContext at the next major release.

Any thoughts?

Most helpful comment

Merged into v2 branch. Going to close this.

All 4 comments

pageContext is less confusing IMO.

Maybe gatsby can throw warnings when building with deprecated pathContext?
Then, it wouldn't be a surprise in 2.0.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Totally agree, pathContext is confusing. pageContext will definitly fit better!

Merged into v2 branch. Going to close this.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

benstr picture benstr  路  3Comments

magicly picture magicly  路  3Comments

totsteps picture totsteps  路  3Comments

KyleAMathews picture KyleAMathews  路  3Comments

kalinchernev picture kalinchernev  路  3Comments