You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As Matrix4 is declared as a readonly array, it is impossibile to re-assign it as an AnimatableValue and to properly animate some transitions. I know this is expected behavior, but any idea on how to implement the following code maintaining the readonly type safety?
Code example:
import{useSharedValue,withTiming}from'react-native-reanimated';import{identity4}from'react-native-redash';constmatrix=useSharedValue(identity4);// matrix is expected to be mutablematrix.value=withTiming(identity4);// This assignment attempts to assign a readonly array to a mutable one
Error:
Argument of type 'Matrix4' is not assignable to parameter of type 'AnimatableValue'.
The type 'readonly [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number]' is 'readonly' and cannot be assigned to the mutable type 'number[]'.ts(2345)
The text was updated successfully, but these errors were encountered:
As Matrix4 is declared as a readonly array, it is impossibile to re-assign it as an AnimatableValue and to properly animate some transitions. I know this is expected behavior, but any idea on how to implement the following code maintaining the readonly type safety?
Code example:
Error:
The text was updated successfully, but these errors were encountered: