Replies: 1 comment
-
It would be great to hear the reasoning behind the decision to make the query object empty during the prerender. I am curious. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Great product; but big question:
https://github.com/vercel/next.js/blob/canary/packages/next/next-server/server/render.tsx#L402
Why???
If you have a look at this issue (which found a bug apparently) #15023 it's said this is because of static optimization. The docs of nextjs themselves say here
That is false however. Query params for many frameworks SSR, HTML, CRA, etc all work as they should even on on pre-built items.
Just as a test; I went into my
node_modules
and in next/dist/next-server/server/render.js updated the code to not remove and replace the query the issue I described doesn't happen anymore.Just so it's here and there's less clicking; the idea behind "inapp=true|1|etc" is my website is not only serving traffic to web users; but some pages are loaded in native client's webviews and thus don't need navigation bars (things like forms, using seamless login from mobile client to web) as such I need a way; with as little code as possible to set a per
browser
session variable that doesn't cause the screen to flash.Here's the code pen example code:
https://codesandbox.io/s/goofy-williams-ru4nv
Can someone explain what the harm is in leaving router props/params/etc inside the query when autoexport is turned on?
If there's no possible way the team will add the query params back; the how is this to be achieved? Currently I'm using getInitialProps on _app.tsx to force it.
Beta Was this translation helpful? Give feedback.
All reactions