-
Notifications
You must be signed in to change notification settings - Fork 644
Deprecation: control flow attributes
Taylor Hunt edited this page Aug 2, 2019
·
3 revisions
The inline control flow attributes if
, while
, and for
are deprecated in favor of their tag counterparts: <if>
, <while>
, and <for>
.
Here’s an example of how to migrate (and hopefully illustrates why you should):
<img class="large-image placeholder" src="https://via.placeholder.com/350x150" aria-describedby="my-fancy-component" if(input.show) />
…now becomes:
<if(input.show)>
<img class="large-image placeholder" src="https://via.placeholder.com/350x150" aria-describedby="my-fancy-component" />
</if>
To automatically fix deprecated marko syntax, try the marko migrate
command from the CLI.