ctrl+k
Enter a search term above to see results...
Enter a search term above to see results...
Lets delve into what exactly is happening in this example.
date
is defined in state
and set to a default value of new Date()
.
The onCreated
callback creates an interval that updates the value of state.date
every second using now()
.
The date is output using the expression formatDate time "h:mm:ss a"
Time is retrieved from the template’s data context.
formatDate
is an included helper this is called with the results of the other expressions evaluated right to left. formatDate(time, 'h:mm ss a')
.
The css includes a CSS token primary-text-color
which is defined in the CSS framework. Variables can be used in your components to reference global styling like, font, size, padding and more.