I have a notebook which inputs a value from another notebook to set the default value for a slider which in turn updates that value being displayed from the other notebook. The problem is this is a circular definition.
I’m wondering if it’s possible to have a set of values that are set once and then frozen as immutable, in this case the default value might be set on page load then this circular reference should not be an issue.
There is a slider: dappLocalProbabilityOfFailure which is then used as {dappLocalProbabilityOfFailure as probabilityOfFailure} from '@bgits/status-dapp-store-utility-value-exploration'
However I would like to use probabilityOfFailure from @bgits/status-dapp-store-utility-value-exploration as the initial value of dappLocalProbabilityOfFailure without creating a circular dependency.
Hmm, I can’t test this properly because CORS restrictions on your data source break my fork (interestingly enough I guess it works in the compare link), but is what you want achieved by the following?
At the bottom, I import another independent copy of @bgits/status-dapp-store-utility-value-exploration
import {probabilityOfFailure as initProbabilityOfFailure} from '@bgits/status-dapp-store-utility-value-exploration'
(This is independent from the other import of that notebook because the other one uses the import...with syntax and this one doesn’t.)
Then I edit viewof dappLocalProbabilityOfFailure:
viewof dappLocalProbabilityOfFailure = slider({
min: 0,
max: 1,
step: .01,
value: initProbabilityOfFailure,
title: "Probability of failure for DApp Store",
description: "The probabilty that this project in isolation will fail"
})