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

andykais picture andykais  路  3Comments

hobochild picture hobochild  路  3Comments

ghost picture ghost  路  3Comments

3CordGuy picture 3CordGuy  路  3Comments

benstr picture benstr  路  3Comments