Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Implement Default trait for RwSignal and StoredValue #1877

Merged
merged 1 commit into from
Oct 11, 2023

Conversation

luoxiaozero
Copy link
Contributor

Implement Default trait for RwSignal and StoredValue so that optional properties can be implemented, such as:

#[component]
fn My(#[prop(optional)] value: RwSignal<f32>) -> impl IntoView {
    ...
}


fn main() {
   view! {
       <My />
   }
}

@gbj
Copy link
Collaborator

gbj commented Oct 11, 2023

Thanks! I could've sworn I did this already but maybe it was in a dream 😅

@gbj gbj merged commit 2003044 into leptos-rs:main Oct 11, 2023
57 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants