Skip to content

.state()

Tutorial — define reactive state properties that trigger UI updates with the .state() builder method.

Updated View as Markdown

Ilha uses Signals to make your components reactive. Use the .state() builder method to define state - any property declared here will automatically trigger UI updates when it changes. Pass the property name and its initial value. All state properties are then available inside .render() via the state property.

Similar concepts

  • React: useState
  • Vue: reactive()
  • Svelte: $state()
Navigation

Type to search…

↑↓ navigate↵ selectEsc close