-
Notifications
You must be signed in to change notification settings - Fork 26.2k
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
getInitialProps called twice #1031
Comments
@fat Is it possible to prepare a repository we can reproduce the issue ? |
hey @nkzawa yep! Here's a github repo: https://github.com/fat/next.js-bug seems to be somethign to do with nested data… for example if the query data i pass is:
if i pass (thanks for taking a look! <3) |
ok… i think i was just misunderstanding how i think im supposed to instead just pass the query string there of "username"… and then put the actual "fetch" of the data object in the |
@fat thank you, I can reproduce now. I don't know why it occurs yet, but we don't support |
yep makes sense |
Hi,
I have the same issue as #524
Here's a bit more info if it's helpful…
I have a super basic express server with the following routes:
and then the following "profile" page component:
If i fetch
/u/guille
my server is correctly fetching the guillermo object and passing it down to my react component on first render…However! once the javascript on the client loads - it is reinitializing the react component and calling getInitialProps a second time (this time with an empty user object, effectively wiping away all my data 😓).
Am I doing something wrong? Im a scrub so very possible.
The text was updated successfully, but these errors were encountered: