|
|
|
|
|
by axhl
1727 days ago
|
|
Not the original commenter but would appreciate more on this. If you can be bothered, could you also expand a bit on how Next.js works under the hood when it comes to forcing CSR à la {typeof window === 'undefined' ? null : children
On a related note, thanks for what you do for Next in the discord. |
|
Once the client-side JS has taken over, the `next/link` component [1] is used to render and listen to events when a user clicks on a link. That component tells `next/router` to render the page that was clicked on. All of this happens on the client by default. If JS is disabled on the client, then the HTML rendered by the `next/link` component on the server is a simple `<a/>` tag and a normal browser page load occurs.
[1] https://nextjs.org/docs/api-reference/next/link