Skip to content

How to enable SSR per page, not just of App? #381

Answered by hi-ogawa
MarioIshac asked this question in Q&A
Discussion options

You must be logged in to vote

<h1>API_KEY_qwertyuiop</h1> is what's rendered by pages/Env.jsx so it looks working though. What do you expect to see instead?

process.env.MY_CUSTOM_SECRET = 'API_KEY_qwertyuiop'

export default function Env() {
let msg = 'default message here'
try {
msg = process.env.MY_CUSTOM_SECRET || msg
} catch {}
return <h1>{msg}</h1>
}

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@MarioIshac
Comment options

@hi-ogawa
Comment options

Answer selected by MarioIshac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants