Optional Arguments

When working with values that may or may not be provided, where the default is outside the range of possible provided values, you can improve your component's interface towards consumers by using optional arguments:

fn main() {
asteracea::component! {
    class?: &'bump str,

    .class? = {class} // `Option<_>`-typed!

asteracea::component! {

    <*Classic> "\n"
    <*Classic .class = {"classicist"}> // Not `Option<_>`-typed!
<DIV class=classicist></DIV>

class is an Option<&'bump str> within Classics .render(…) method, but the parameter is provided from outside as &'bump str.