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

Change the Option<Script> prop to Script in <ScriptEffect/> #10

Closed
Madoshakalaka opened this issue Jan 1, 2022 · 0 comments
Closed

Comments

@Madoshakalaka
Copy link
Owner

<ScriptEffect {script}/> is not meant to be used with None.

html! {
if script.is_some() {
<ScriptEffect {script}/>
<p>{"Now check your console!"}</p>
}else{
<Progress id="blessings-progress" label="blessings.js is loading"/>
}

can be changed to:

 html! { 
     if let Some(script) = script { 
         <ScriptEffect {script}/> 
         <p>{"Now check your console!"}</p> 
     }else{ 
         <Progress id="blessings-progress" label="blessings.js is loading"/> 
     } 
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

No branches or pull requests

1 participant