-
Notifications
You must be signed in to change notification settings - Fork 644
Deprecation: legacy await
Taylor Hunt edited this page Aug 2, 2019
·
3 revisions
The <await>
tag has been updated to take advantage of new Marko language features: tag parameters and attribute tags.
This change removes some redundant attributes, simplifies things, and provides access to the error
object that the promise rejects with inside <@catch>
.
The older syntax:
<await(person from personPromise)>
<await-placeholder>Loading…</await-placeholder>
Hello ${person.name}!
</await>
…is replaced with <@placeholder>
and <@then>
attribute tags:
<await(personPromise)>
<@placeholder>Loading…</@placeholder>
<@then|person|>Hello ${person.name}!</@then>
</await>
To automatically fix deprecated marko syntax, try the marko migrate
command from the CLI.