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.

with-iron-session-app not correct SSR example

See original GitHub issue

What example does this report relate to?

with-iron-session-app

What version of Next.js are you using?

11.0.1

What version of Node.js are you using?

14.17.0

What browser are you using?

Chrome

What operating system are you using?

macOS

How are you deploying your application?

next start

Describe the Bug

Example contains page profile-ssr.js and header with authorization details:

Screenshot 2021-07-13 at 11 20 58

But with disabled javascript authorization information disappears from header:

Screenshot 2021-07-13 at 11 22 24

I think in “ssr” example all page should be filled on server side.

Expected Behavior

Authorization information in header from SSR

To Reproduce

  1. Login
  2. Move to http://localhost:3000/profile-ssr
  3. Disable javascript
  4. Refresh the page

image

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
vvocommented, Nov 24, 2021

@bacher That’s a good point and if you feel like it then it’s a good way to participate in the project by modifying the iron session example. Thanks!

0reactions
bachercommented, Nov 24, 2021

Hey there, if you want the header to contain data from the session in the source HTML, then, as of today, your best bet would be to pass it down as a prop from the page with getServerSideProps.

I understand that, but anyway, example seem to me little bit confusing, because of: one part of the page is really SSR, but another part is client side render.

But example titled: “SSR”.

Read more comments on GitHub >

github_iconTop Results From Across the Web

SSR is not work when adding vendor split chunks #527 - GitHub
Bug Report When using the SSR example of this repo, and adding vendor split chunks To Reproduce Run this project ...
Read more >
How to Enable Server-Side Rendering for a React App
First, use npx to start up a new React app using the latest version of Create React App. Let's call the app, react-ssr-example...
Read more >
Next js app with SSR is not pre-rendering HTML, so web ...
I have a next.js app that uses server side rendering. When running the application both locally and in production (on vercel edge), the...
Read more >
A beginner's guide to React Server-Side Rendering (SSR)
They are not only perfect for rapid prototyping but for designing complex web applications as well (if done right).
Read more >
Using Non-SSR Friendly Components with Next.js
When Not to Use Server-Side-Rendering? Sometimes, you might need to opt-out of SSR from Next.js pages or components. For example, integrating third-party ...
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