Because server components run in a node.js environment, while client components run in the browser, they have access to different APIs and properties.
React Environment Values
server
node.js
- | |
- | |
- | |
- | |
- | |
- | |
- | |
- | |
- | |
production | |
file:///vercel/path0/app/(routes)/demos/environment/environmentValues.tsx | |
/var/task | |
/var/task/.next/server/app/(routes)/demos/environment | |
v20.18.3 (linux/x64) | |
x64 | |
vint_runtime | |
20 MB / 28 MB | |
0d 0h 0m 0s |
client
node.js
Next.JS / Vercel Specific Environment Values
server
node.js
SUPER SECRET | |
NOT ACTUALLY SECRET | |
169.254.86.157 | |
linux | |
5.10.235-247.919.amzn2.x86_64 | |
2 | |
172.71.255.140 | |
Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; [email protected]) | |
rsc.xn--pckua0m.xn--tckwe | |
- | |
Cookie not found | |
- | |
- | |
- | |
nodejs | |
production | |
production | |
rsc-lmrapbxmx-kurisus-projects-6be1687d.vercel.app | |
rsc-git-main-kurisus-projects-6be1687d.vercel.app | |
rsc.xn--pckua0m.xn--tckwe | |
github | |
rsc | |
kurisu-dotto-komu | |
958866517 | |
main | |
5e788d75de5041bee8b4e81b62f2013ee3e40202 | |
Typos | |
kurisu-dotto-komu | |
クリス.コム | |
1 | |
- | |
production | |
production | |
rsc-lmrapbxmx-kurisus-projects-6be1687d.vercel.app | |
rsc-git-main-kurisus-projects-6be1687d.vercel.app | |
rsc.xn--pckua0m.xn--tckwe | |
iad1 | |
dpl_EhusWUpwp7QZHRnTp9rxa3Lq7esm | |
prj_hhk7ojmXUzUUGph3ddAieSboTgwL | |
- | |
- | |
- | |
github | |
rsc | |
kurisu-dotto-komu | |
958866517 | |
main | |
5e788d75de5041bee8b4e81b62f2013ee3e40202 | |
Typos | |
kurisu-dotto-komu | |
クリス.コム | |
client
node.js
Remember, Shared Components will inherit whichever environment they are imported into, but this shouldn't really make a difference if they are written to be environment agnostic, as they should be.
Next, let's explore how boundaries work between server and client components.