Replies: 1 comment
-
Note: I was only going for the Something like export const updateProps: (
viewDescriptor: SharedValue<Descriptor[]>,
updates: StyleProps | AnimatedStyle,
maybeViewRef: ViewRefSet<any> | undefined
) => void = (viewDescriptor, updates, maybeViewRef) => {
// split `viewDesciptors` and `maybeViewRef` into pairs that have either `updateReanimatedPropsCallback` or not and call either
// maybeViewRef[updateReanimatedPropsCallback](updates)
// or
// updatePropsByPlatform(viewDescriptor, updates, maybeViewRef)
}
}; That would require some changes to tracking |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I just filed a PR with
react-native-svg
that would add support for integratingreact-native-reanimated
on theweb
renderer. You can see that PR here: software-mansion/react-native-svg#1886That said: that PR is doing a lot of cumbersome things to somehow provide an interface to
react-native-svg
to update attributes in batches, since granular updates are just not feasible there. This could at this point be done throughsetNativeProps
, but apparently that is going to be deprecated and removed at some point.So, I would like to propose the following change to this code:
This way, an external library like
react-native-svg
that still has to do some modifications to attributes before flushing them to the native level could provide a hook to receive all data at once and handle the update more gracefully on their side.It would also be a handy hook in user-written components that would not directly correlate to a native component.
If you would be okay with this, I would be happy to file a PR.
Beta Was this translation helpful? Give feedback.
All reactions