Crate sycamore

Source
Expand description

§Sycamore API Documentation

Sycamore is a reactive library for creating web apps in Rust and WebAssembly.

This is the API docs for sycamore. If you are looking for the usage docs, checkout the Sycamore Book.

§Feature Flags

  • hydrate - Enables hydration support in DOM nodes. By default, hydration is disabled to reduce binary size.

  • serde - Enables serializing and deserializing Signals and other wrapper types using serde.

  • suspense - Enables wrappers around wasm-bindgen-futures to make it easier to extend a reactive scope into an async function.

  • nightly - Enables nightly-only features. This makes it slightly more ergonomic to use signals.

  • wasm-bindgen-interning (default) - Enables interning for wasm-bindgen strings. This improves performance at a slight cost in binary size. If you want to minimize the size of the result .wasm binary, you might want to disable this.

  • web (default) - Enables the web backend for Sycamore. This feature is enabled by most of the other features so you should rarely need to enable it manually.

Modules§

easing
Easing functions.
futures
Utilities for working with async.
motion
Utilities for smooth transitions and animations.
prelude
The Sycamore prelude.
reactive
Reactive primitives for Sycamore.
web
Web support for Sycamore.

Macros§

view
A macro for ergonomically creating complex UI complex layouts.

Functions§

hydrate
Render a View under a parent node by reusing existing nodes (client side hydration).
hydrate_in_scope
Render a View under a parent node, in a way that can be cleaned up.
hydrate_to
Render a View under a parent node by reusing existing nodes (client side hydration).
render
Render a View into the DOM. Alias for render_to with parent being the <body> tag.
render_in_scope
Render a View under a parent node, in a way that can be cleaned up.
render_to
Render a View under a parent node. For rendering under the <body> tag, use render instead.
render_to_string
Render a View into a static String. Useful for rendering to a string on the server side.
render_to_string_await_suspense
Renders a View into a static String while awaiting for all suspense boundaries to resolve. Useful for rendering to a string on the server side.
render_to_string_in_scope
Render a View into a static String in the current reactive scope.
render_to_string_stream
Renders a View to a stream.

Attribute Macros§

cfg_not_ssr
A macro for feature gating code that should only be run on the web.
cfg_ssr
A macro for feature gating code that should only be run on the server.
component
A macro for creating components from functions.

Derive Macros§

Props
The derive macro for Props. The macro creates a builder-like API used in the view! macro.