const [activeState, setActiveState] = useFluidState(false)
const whenFac: WhenFactoryFunction = ({ screenSize, metrics, state, stateValue }) => {
console.log("State value? ", stateValue)
return {
interpolation: [
{
styleKey: "transform.translateY",
inputRange: [0, 1],
outputRange: [0, 10],
},
],
}
}
const config = useFluidConfig( WhenState(activeState, whenFac))
....
In this example
stateValueis always undefined when the factory runs regardless of the value ofactiveStateIf I add a line
activeState.value = activeState.activethen stateValue gets passed to the factory function.