Deprecation: vars is deprecated - marko-js/marko GitHub Wiki
The var
and vars
taglib properties are deprecated. Use tag parameters instead.
To take the example from marko-js-samples/scoped-variables
:
In the usage of the tag, remove the var
attribute and receive the variable as a tag parameter instead:
- <date-now var="now">
+ <date-now|now|>
The current time is ${now.time}.
The current date is ${now.dayOfWeek}, ${now.month} ${now.dayOfMonth}, ${now.year}
</date-now>
And update the <date-now>
custom tag to remove the vars
property in the taglib/date-now/marko-tag.json file:
{
"renderer": "./renderer",
- "@var": "identifier",
- "vars": [
- {
- "name-from-attribute": "var"
- }
- ]
}