Enter a search term above to see results...
On This Page
Dependency
Dependency
is a core class in Semantic UI’s reactivity system that manages dependencies between reactive computations and data sources.
Advanced Use Only - Dependency should not be used by most developers directly to control dependencies, but is instead used internally by
ReactiveVar
andReaction
to establish reactivity. Only some particular advanced use cases or metaframeworks will need to access this class directly.
constructor
Creates a new Dependency instance.
Syntax
Usage
depend
Registers the current reaction as dependent on this Dependency.
Syntax
Usage
changed
Notifies all dependent reactions that this dependency has changed, causing them to re-run.
Syntax
Parameters
Name | Type | Description |
---|---|---|
context | any | (Optional) Additional context information to pass to invalidated reactions |
Usage
cleanUp
Removes a specific reaction from this dependency’s list of dependents.
Syntax
Parameters
Name | Type | Description |
---|---|---|
reaction | Reaction | The reaction to remove from the dependency list |
Usage
unsubscribe
Alias for cleanUp
. Removes a specific reaction from this dependency’s list of dependents.
Syntax
Parameters
Name | Type | Description |
---|---|---|
reaction | Reaction | The reaction to unsubscribe from the dependency |