The batch(fn) function can be used to combine multiple value
updates into one "commit" at the end of the provided callback.
Batches can be nested and changes are only flushed once the
outermost batch callback completes. Accessing a signal that has
been modified within a batch will reflect its updated value.
Creates a new signal that is computed based on the values of
other signals. The returned computed signal is read-only, and
its value is automatically updated when any signals accessed
from within the callback function change.
To run arbitrary code in response to signal changes, we can
use effect(fn). Similar to computed signals, effects track
which signals are accessed and re-run their callback when
those signals change. If the callback returns a function, this
function will be run before the next value update.
Unlike computed signals, effect() does not return a signal -
it's the end of a sequence of changes.
In case when you're receiving a callback that can read some signals, but you don't want to subscribe to them, you can use untracked to prevent any subscriptions from happening.