Open xaviervia opened 1 year ago
Example:
const [valueFacet, setValue, valueRef] = useFacetState(0)
This would be equivalent to doing
const [valueFacet, setValue] = useFacetState(0) const valueRef = useFacetRef(valueFacet)
But then there would be no need for useFacetRef do use a useFacetEffect, instead updating the ref could happen in the setter. This would help with performance, and make the type of the ref cleaner (since it can't be NO_VALUE in this case)
useFacetRef
useFacetEffect
NO_VALUE
Example:
This would be equivalent to doing
But then there would be no need for
useFacetRef
do use auseFacetEffect
, instead updating the ref could happen in the setter. This would help with performance, and make the type of the ref cleaner (since it can't beNO_VALUE
in this case)