website
website copied to clipboard
Typescript docs is missing single file component state definition
Hey, just noticed that there is no docs relating to state definition for single file components like below
class {
declare state: { x: number, y: number };
onCreate() {
this.state = { x: 0, y: 0 }
}
}
<div>${state.x + state.y}</div>