getDefaultReactiveDomain()
withReactiveDomain(domain, expr)
onReactiveDomainEnded(domain, callback, failIfNull = FALSE)
NULL
domain
TRUE
then an error is given if the domain
is NULL
NULL
). You can
access the current default reactive domain by calling
getDefaultReactiveDomain
.Unless you specify otherwise, newly created observers and reactive
expressions will be assigned to the current default domain (if any). You can
override this assignment by providing an explicit domain
argument to
reactive
or observe
.
For advanced usage, it's possible to override the default domain using
withReactiveDomain
. The domain
argument will be made the
default domain while expr
is evaluated.
Implementers of new reactive primitives can use onReactiveDomainEnded
as a convenience function for registering callbacks. If the reactive domain
is NULL
and failIfNull
is FALSE
, then the callback will
never be invoked.