Signal values can be updated using the set
or update
methods. When updating signal values, it's crucial to follow immutable practices.
Key points to keep in mind:
set
method for updating primitive values like strings or numbersupdate
method with a callback that returns a new object or array when updating complex valuesFailure to follow immutable practices can result in stale data being displayed in the template.