docs: must use View (#1302)

This commit is contained in:
Greg Johnston 2023-07-08 06:42:02 -04:00 committed by GitHub
parent c6b8f0e8ed
commit ae3ddcb0e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -483,6 +483,9 @@ impl Text {
/// A leptos view which can be mounted to the DOM.
#[derive(Clone, PartialEq, Eq)]
#[must_use = "You are creating a View but not using it. An unused view can \
cause your view to be rendered as () unexpectedly, and it can \
also cause issues with client-side hydration."]
pub enum View {
/// HTML element node.
Element(Element),