Creates a new mutable signal, initialized to undefined.
undefined
Example:
const foo = reactive<number>();console.log(foo.value); // undefinedfoo.value = 123; // updates the current value Copy
const foo = reactive<number>();console.log(foo.value); // undefinedfoo.value = 123; // updates the current value
Creates a new mutable signal, initialized to the given value.
const foo = reactive(123);console.log(foo.value); // 123foo.value = 456; // updates the current value Copy
const foo = reactive(123);console.log(foo.value); // 123foo.value = 456; // updates the current value
Optional
Creates a new mutable signal, initialized to
undefined
.Example: