Add initial tools for managing derivations and React compatibility (#202)
Co-authored-by: Cole Lawrence <cole@colelawrence.com> Co-authored-by: Elliot <key.draw@gmail.com> Co-authored-by: Aria <aria.minaei@gmail.com>
This commit is contained in:
parent
bebf281517
commit
f1844952ea
12 changed files with 320 additions and 30 deletions
|
@ -70,18 +70,18 @@ export class PrismDerivation<V> extends AbstractDerivation<V> {
|
|||
|
||||
popCollector(collector)
|
||||
|
||||
this._dependencies.forEach((dep) => {
|
||||
for (const dep of this._dependencies) {
|
||||
if (!newDeps.has(dep)) {
|
||||
this._removeDependency(dep)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
this._dependencies = newDeps
|
||||
|
||||
startIgnoringDependencies()
|
||||
newDeps.forEach((dep) => {
|
||||
for (const dep of newDeps) {
|
||||
this._cacheOfDendencyValues.set(dep, dep.getValue())
|
||||
})
|
||||
}
|
||||
stopIgnoringDependencies()
|
||||
|
||||
return value!
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue