pub fn SignedInWhenLoaded(_: SignedInWhenLoadedProps) -> ElementExpand description
Render children only after clerk-js has loaded and auth resolved to signed in.
The loading-aware counterpart to SignedIn, mirroring
crate::SignedOutWhenLoaded. This is useful in fullstack/SSR apps that
render before clerk-js has finished resolving the browser session: use
fallback for the interim (for example an avatar skeleton) and render
crate::ClerkFailed or crate::use_clerk_error nearby for failures.
§Example
use dioxus::prelude::*;
use dioxus_clerk::*;
#[component]
fn AccountNav() -> Element {
rsx! {
SignedInWhenLoaded {
fallback: rsx! { span { "Checking auth..." } },
UserButton {}
}
}
}§Props
For details, see the props struct definition.
fallback:ElementRendered while clerk-js is loading and no resolved signed-out state is known.
treat_pending_as_signed_out:boolWhether a session with pending after-auth tasks is treated as signed out. See
SignedIn.children:Element