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

Update building-apps-with-gatsby.md #10255

Closed
wants to merge 3 commits into from

Conversation

jaredpalmer
Copy link

Add docs about avoiding request waterfalls with client routes by overriding component renderer key prop (#10227 (comment))

Closes #10227

Add docs about avoiding request waterfalls with client routes by overriding component renderer `key` prop (gatsbyjs#10227 (comment))

Closes gatsbyjs#10227
@@ -53,3 +53,18 @@ exports.onCreatePage = async ({ page, actions }) => {
> [gatsby-plugin-create-client-paths](/packages/gatsby-plugin-create-client-paths/).

Check out the ["simple auth" example site](https://github.com/gatsbyjs/gatsby/blob/master/examples/simple-auth/README.md) for a demo implementing user authentication and restricted client-only routes.

### Known Issues
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably needs a better heading.

Copy link
Contributor

@LekoArts LekoArts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Just left one comment (and I don't have a better name for the heading 😆 ).

Linting CI is currently failing, you can run prettier this way:

npx prettier --write docs/docs/building-apps-with-gatsby.md

or

npm install -g prettier

and then

prettier --write docs/docs/building-apps-with-gatsby.md

docs/docs/building-apps-with-gatsby.md Outdated Show resolved Hide resolved
@jaredpalmer
Copy link
Author

sorry i'm on my phone. can you run prettier?

LekoArts and others added 2 commits December 3, 2018 09:41
Co-Authored-By: jaredpalmer <jaredloganpalmer@gmail.com>
@pieh
Copy link
Contributor

pieh commented Dec 4, 2018

After chat with @KyleAMathews we decided to fix/change this for client-only-paths ( #10261 ) + add some tests to catch any regressions in future.

We will need to update docs on this, but message from this PR will need to be inverted - but that's on us. Thanks for jumping on adding this "gotcha" to docs while we were still debating how to approach the problem.

@jaredpalmer
Copy link
Author

Honestly, was very confused as to why this was not the default at first. Def agree that it should be as gatsby is billed as an "app" toolchain too. Makes wayyyy more sense now.

@LekoArts
Copy link
Contributor

LekoArts commented Jan 2, 2019

@pieh Since #10261 is merged we can close this PR? 😊

@DSchau
Copy link
Contributor

DSchau commented Jan 3, 2019

Yeah - good call @LekoArts.

@jaredpalmer thanks for this PR, but since we fixed the underlying issue, that's probably preferable over documenting something that isn't necessarily needed.

If I'm off-base, please feel free to re-open and we can chat further!

Thanks for using Gatsby 💜

@DSchau DSchau closed this Jan 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

gatsby-plugin-create-client-paths remounts the root on every page transition
4 participants