Overview
These APIs ship in core mates so the same components run on the server and in the browser. Use them to gate DOM APIs, read the request context during SSR, and coordinate async completion.
Hydration flags and the boot script live on Hydration. Store snapshot transfer is documented under globalStore and pageStore.
Flags
|
API
|
When true
|
Notes
|
|---|---|---|
isServer()
| Node start process | Symbol.for('mates.server') |
isBrowser()
| Client JS realm | Symbol.for('mates.browser') |
isDev()
| Non-production env | Independent of SSR |
Flag readout (browser)
In the SPA playground every SSR flag is false; isDev follows the build.
getContext() on the client
Returns undefined outside a server request.