createSignal / createComputed
createSignal
and createComputed
are helper functions that create a Signal
or Computed
and return it with a value
property.
It mimics the style of vue.js ref and preact signals where the value
property is used to get and set the value of the Signal
or Computed
.
Usage
API
createSignal
Creates a writable signal with a value
property.
createComputed
Creates a computed under the hood and returns it with a value
property.