Try Install Learn Blog API Packages GitHub
Pages

Computed Properties

Computed properties are functions that work like properties, they are defined with the get keyword and no arguments.

component Greeter {
  property name : String = ""

  get text : String {
    "Hello " + name + "!"
  }

  fun render : Html {
    <div>
      <{ text }>
    </div>
  }
}

Optional type

The type annotation is optional:

component Greeter {
  property name : String

  get text {
    "Hello " + name + "!"
  }

  fun render {
    <div>
      <{ text }>
    </div>
  }
}