My code
use yew::{
function_component,
Html,
html,
};
use stylist::yew::use_style;
#[function_component]
pub fn App() -> Html {
let styles = use_style!("color: red;");
html! {
<div class={styles}>
</div>
}
}
Example from Docs
use stylist::yew::use_style;
use yew::prelude::*;
#[function_component(Comp)]
fn comp() -> Html {
// Returns a Style instance.
let style = use_style!("color: red;");
html! {<div class={style}>{"Hello world!"}</div>}
}
I get this error
the trait bound `impl yew::functional::hooks::Hook<Output = stylist::Style> + '_: yew::Hook` is not satisfied
the trait `yew::Hook` is implemented for `yew::BoxedHook<'_, T>`
(E0277)