Skip to main content

Crate ntui_macros

Crate ntui_macros 

Source

Macros§

element
JSX-alike: element! { View(gap: 1) { Text(content: "hi") #(iter) } }. Hosts: View, Text, Fragment, ContextProvider(value: ..). Anything else is a component; its props type is {Name}Props by convention (Default-filled).

Attribute Macros§

component
Turns fn Name(props: &NameProps, hooks: &mut Hooks) -> Element { .. } (or the props-less form fn Name(hooks: &mut Hooks) -> Element) into a unit struct implementing ntui::Component.