marko v3.6.0 Release Notes

    • ๐Ÿ‘€ Introduced a new and simpler <await> tag that should be used instead of the now deprecated <async-fragment> tag (see deprecation details below) (Pull Request #312 by @mlrawlings)

    ๐Ÿ—„ Deprecations

    • ๐Ÿ—„ Deprecated the <async-fragment var="<var>" data-provider=<data-provider>> tag in favor of the <await(<var> from <data-provider>)> tag:

    OLD:

    <async-fragment var="userInfo" data-provider=data.userInfoPromise>
        Hello ${userInfo.name}!
    </async-fragment>
    

    ๐Ÿ†• NEW:

    <await(userInfo from data.userInfoPromise)>
        Hello ${userInfo.name}!
    </await>
    

    ๐Ÿ‘ The <await> tag supports all of the attributes of the previous <async-fragment> tag except for var and data-provider:

    <await(userInfo from data.userInfoPromise) name="userInfo" timeout=10000 client-reorder>
        Hello ${userInfo.name}!
    </await>
    

    โฑ Finally, the nested tags for providing content for the placeholder, error and timeout messages have been renamed accordingly:

    <await(userInfo from data.userInfoPromise) client-reorder>
        <await-placeholder>
            This is alternate content while the async fragment is loading.
        </await-placeholder>
        <await-timeout>
            A timeout has occurred!
        </await-timeout>
        <await-error>
            A error has occurred!
        </await-error>
    
        Hello ${userInfo.name}!
    </await>