sycamore

Attribute Macro cfg_ssr

#[cfg_ssr]
Expand description

A macro for feature gating code that should only be run on the server.

By default, the target is used to determine the rendering mode. However, --cfg sycamore_force_ssr can be used to override this behavior.

ยงExample

#[cfg_ssr]
fn server_only() {}

See also cfg_not_ssr.