question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error property 'left' is not supported by native animated module when using swipe

See original GitHub issue
<Modal isVisible={this.state.isTimelineOpen}
                       onSwipe={() => this.setState({isTimelineOpen: false})} swipeDirection="up">
                    <Text>Test<Text/>
                </Modal>

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?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:18
  • Comments:27 (12 by maintainers)

github_iconTop GitHub Comments

57reactions
erickreutzcommented, Aug 2, 2018

This is not due to react native limitations. This is a problem because getLayout is being used which animates the left and top style properties of a view which are not supported by useNativeDriver. an alternative to getLayout exists called getTranslateTransform (See here) that animates translateX and translateY instead of top and left but since react-native-animatable animations are using those properties to pull off the in/out transitions and react-native-animatable will override the transform on the view when you try and set the transform explicitly this is not currently possible.

56reactions
denielercommented, Oct 28, 2018

you can use

{
  transform: [{
    translateX: 50
  }]
}

to simulate animation for the left positioning if you don’t have strict restrictions about using left property

Read more comments on GitHub >

github_iconTop Results From Across the Web

React-native Animation.event style property is not supported
This error comes from validateTransform function inside React Native lib.You can check the TRANSFORM_WHITELIST in NativeAnimatedHelper for the ...
Read more >
Error property 'left' is not supported by native animated module when ...
Error property 'left' is not supported by native animated module when using swipe.
Read more >
react-native-modal - npm
An enhanced, animated, customizable React Native modal. The goal of react-native-modal is expanding the original React Native <Modal> component ...
Read more >
Animations - React Native
Animated focuses on declarative relationships between inputs and outputs, with configurable transforms in between, and start / stop methods ...
Read more >
Native Stack Navigator | React Navigation
To use this navigator, ensure that you have @react-navigation/native and its dependencies (follow this guide), then install @react-navigation/native-stack : npm ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found