{ "New Yew function component": { "prefix": "yewfc", "body": [ "#[derive(PartialEq, Properties)]", "pub struct ${1:ComponentName}Props {}", "", "#[function_component]", "pub fn $1(props: &${1}Props) -> Html {", " let ${1}Props {} = props;", " html! {", " <${2:div}>$0", " }", "}" ], "description": "Create a minimal Yew function component" }, "New Yew struct component": { "prefix": "yewsc", "body": [ "pub struct ${1:ComponentName};", "", "pub enum ${1}Msg {", "}", "", "impl Component for ${1} {", " type Message = ${1}Msg;", " type Properties = ();", "", " fn create(ctx: &Context) -> Self {", " Self", " }", "", " fn view(&self, ctx: &Context) -> Html {", " html! {", " $0", " }", " }", "}" ], "description": "Create a new Yew component with a message enum" } }