SolidJSS
SolidJS3y ago
46 replies
thetarnav

Check if the code runs in CSR or CSR + hydration

Is there a way to check if the code runs during hydration or just normal CSR, the same way you are able to check if you are on the server or clinet using isServer or export conditions?

This is mostly about authoring libraries, where you want to run different logic depending on if the env is SSR / CRS / CRS + hydration.

it's related to the issue here: https://github.com/solidjs-community/solid-primitives/issues/310
Was this page helpful?