question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Mention that the navigate helper is not available during SSR

See original GitHub issue

Motivation

When using the navigate helper, it was easy to forget/not realize that it’s not available during SSR. The documentation page should mention how to handle that.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
blainekastencommented, May 18, 2020

@dandv if you want to submit a PR feel free. However I personally feel like it’s not that beneficial to document for a few reasons.

  1. Devs rarely should be invoking functions like this during the render phase
  2. The API is deprecated and will be removed in the next version of Gatsby.

I’m going to close the issue, but i’ll cc @AishaBlake who leads our documentation to weigh in if she feels differently. Thanks for raising concern though!

0reactions
casewalkercommented, Dec 9, 2022
  1. The API is deprecated and will be removed in the next version of Gatsby.

The version is now Gatsby 5 and navigate is still alive and well!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Gatsby window not available during server side rendering ...
navigate only works for internal routing. As has been said, the redirection is external therefore must be treated using window . – Ferran...
Read more >
Adding Navigation In React SSR - Anil Verma - Medium
So We have StaticRouter on Server side and BrowserRouter for Client side. Go to index file and make following change. Express as server...
Read more >
Gatsby Link API
How to use the navigate helper function. Sometimes you need to navigate to pages programmatically, such as during form submissions. In these cases,...
Read more >
Creating Server-side Rendered Vue.js Apps Using Nuxt.js
Open your browser to localhost:3000 and your project should be running. Not much different from creating a Vue Webpack project. However, when we...
Read more >
Implementing SSR in Next.js: Dynamic routing and prefetching
And while static site generation (SSG) is considered simpler and faster, there are cases where server-side rendering is your only option.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found