-
Notifications
You must be signed in to change notification settings - Fork 623
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error property 'left' is not supported by native animated module when using swipe #163
Comments
Hi! |
Seems like it's due to having useNativeDriver={true} which I really need to have a smooth animation. |
Are you setting other props? Seems related to react-native-animatable |
Well my complete code looks like this:
If you remove useNativeDriver={true}, it works. |
I investigated a bit and I think that |
This is not due to react native limitations. This is a problem because |
Thanks for expanding the discussion, re-opening. |
The problem is that you have to define react-native-animatable animations ahead of time and don't seem to have a way to dynamically influence them or manipulate them from an interaction so I can't think of a way to solve this outside of getting rid of react-native-animatable in favor of defining the animations ourselves. |
Gotcha. I agree. I think defining the definitions ourselves might be the best solution (replacing only the ones used on the swiping interactions). |
I encounter the same issue. Using useNativeDriver is so good for smooth animation. Any idea how to fix this? Thanks a lot |
@berpcor unfortunately this is still an open issue, see the comments above |
you can use
to simulate animation for the left positioning if you don't have strict restrictions about using |
If I try to show a modal without Does anybody progress with that issue? |
@amazing-space-invader read my previous answer |
I think this issue is also happening when not animating left. |
Look into https://github.com/maxs15/react-native-modalbox if you absolutely need native animations for now. |
@denieler mind expanding a bit? I understand that the I'm available for helping out if someone is willing to tackle the issue 👍 |
Here's a temporary workaround if you are willing to sacrifice the the visual drag feedback in exchange for native driver animations: #247 |
@cjroth Funny thing is, if you use an animatable animation that doesn't use the If there's a way to override the |
Looks like it is fixed in 8.0.0-beta, but now swiping is not actual dragging children anymore. |
@DimitryDushkin Hm, I just tested it and the swiping is working fine for me (still having issues with the scrollable content though). |
I still have this problem: #332 |
I have the following implementation: const FullScreenModal = ({
children,
modalStyle,
contentStyle,
closeButtonStyle,
hideCloseButton = false,
onClose,
onModalShow,
transparency,
...other
}: Props) => {
const [useNativeDriver, setUseNativeDriver] = useState(true);
const handleOnModalShow = useCallback(() => {
setUseNativeDriver(false);
if (onModalShow) {
onModalShow();
}
}, []);
return (
<RNModal
style={[styles.container, modalStyle]}
backdropOpacity={typeof transparency === 'number' ? transparency : transparency ? 0.9 : 1}
backdropColor={DARK_INDIGO}
onSwipeComplete={onClose}
swipeDirection={onClose ? 'down' : null}
animationIn="fadeInUp"
animationOut="fadeOutDown"
onBackButtonPress={onClose}
onBackdropPress={onClose}
useNativeDriver={useNativeDriver}
onModalShow={handleOnModalShow}
{...other}
>
<View style={contentStyle}>
{children}
{!hideCloseButton && !!onClose && (
<ModalCloseButton
onPress={onClose}
containerStyle={[styles.closeButton, closeButtonStyle]}
/>
)}
</View>
</RNModal>
);
}; It looks like switching |
react-native-gesture-handler is great and I'm all for using it... someone would have to tackle it though, which is not an easy task |
Swipe up/down is easy |
Keeping it as simple as the above, I'm getting an error that says "property left is not supported by native animated module. Any ideas?
The text was updated successfully, but these errors were encountered: