pub struct ShellProps {
Show 15 fields pub path: String, pub template: Rc<Template<TemplateNodeType>>, pub was_incremental_match: bool, pub locale: String, pub router_state: RouterState, pub page_state_store: PageStateStore, pub translations_manager: Rc<RefCell<ClientTranslationsManager>>, pub error_pages: Rc<ErrorPages<DomNode>>, pub initial_container: Element, pub container_rx_elem: Element, pub global_state: GlobalState, pub frozen_app: Rc<RefCell<Option<(FrozenApp, ThawPrefs)>>>, pub route_verdict: RouteVerdict<TemplateNodeType>, pub is_first: Rc<Cell<bool>>, pub live_reload_indicator: ReadSignal<bool>,
}
Expand description

Properties for the app shell. These should be constructed literally when working with the app shell.

Fields

path: String

The path we’re rendering for (not the template path, the full path, though parsed a little).

template: Rc<Template<TemplateNodeType>>

The template to render for.

was_incremental_match: bool

Whether or not the router returned an incremental match (if this page exists on a template using incremental generation and it wasn’t defined at build time).

locale: String

The locale we’re rendering in.

router_state: RouterState

The router state.

page_state_store: PageStateStore

The template state store.

translations_manager: Rc<RefCell<ClientTranslationsManager>>

A client-side translations manager to use (this manages caching translations).

error_pages: Rc<ErrorPages<DomNode>>

The error pages, for use if something fails.

initial_container: Element

The container responsible for the initial render from the server (non-interactive, this may need to be wiped).

container_rx_elem: Element

The container for reactive content.

global_state: GlobalState

The global state store. Brekaing it out here prevents it being overriden every time a new template loads.

frozen_app: Rc<RefCell<Option<(FrozenApp, ThawPrefs)>>>

A previous frozen state to be gradully rehydrated. This should always be None, it only serves to provide continuity across templates.

route_verdict: RouteVerdict<TemplateNodeType>

The current route verdict. This will be stored in context so that it can be used for possible reloads. Eventually, this will be made obsolete when Sycamore supports this natively.

is_first: Rc<Cell<bool>>

Whether or not this page is the very first to have been rendered since the browser loaded the app.

live_reload_indicator: ReadSignal<bool>

An indicator Signal used to allow the root to instruct the app that we’re about to reload because of an instruction from the live reloading server.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.