Style property 'backgroundColor' is not supported by native animated module, when navigating back from browser.
See original GitHub issueCurrent behaviour
I am using the card component to display news in my app. On click, I use the react-native’s inbuilt Linking
to open a browser to display the article. Everything works fine till here. But when I click navigate back to the app using the back navigation button on iOS the app crashes with the below error.
Expected behaviour
I don’t expect any errors on navigating back to the app.
Code sample
JSX
<Section header={'News'}>
{loading ? (
<ActivityIndicator />
) : news.length < 1 ? (
<Text>No News</Text>
) : (
news.slice(0, 5).map((item) => {
const date = new Date(item.publishedAt);
return (
<Card
style={{marginVertical: 10}}
key={`${item.url}`}
onPress={() => handlePress(item.url)}>
{/* <Surface> */}
<Card.Title
style={{padding: 10}}
title={item.title}
titleNumberOfLines={3}
subtitle={moment(date).format('DD MMMM YY')}
// left={LeftContent}
/>
<Card.Content style={{padding: 10}}>
<Paragraph>{item.description}</Paragraph>
</Card.Content>
<Card.Cover source={{uri: item.urlToImage}} />
{/* </Surface> */}
</Card>
);
})
)}
</Section>
Function to open article
const handlePress = useCallback(async (url) => { // Checking if the link is supported for links with custom URL scheme. const supported = await Linking.canOpenURL(url);
if (supported) {
// Opening the link with some app, if the URL scheme is "http" the web link should be opened
// by some browser in the mobile
await Linking.openURL(url);
} else {
Alert.alert(`Don't know how to open this URL: ${url}`);
}
}, []);
Screenshots (if applicable)
What have you tried
Your Environment
software | version |
---|---|
ios or android | iOS |
react-native | 0.63.4 |
react-native-paper | ^4.7.1 |
node | v15.3.0 |
npm or yarn | yarn |
expo sdk |
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top Results From Across the Web
Style property 'width' is not supported by native animated ...
When adding it and setting it to 'yes', I got an error saying that " style property 'width' is not supported by native...
Read more >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 property ...
Read more >Animations - React Native
The opacity property on the View is mapped to this animated value. Behind the scenes, the numeric value is extracted and used to...
Read more >animation - CSS: Cascading Style Sheets - MDN Web Docs
The animation shorthand CSS property applies an animation between styles. ... Determines whether the animation is playing or not.
Read more >Introduction to Angular animations
The W3C maintains a list of animatable properties on its CSS Transitions page. About this guidelink. This guide covers the basic Angular animation...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi All after removeing
onPress
form<Card />
fixed the theme problem so now I am usingTouchableOpacity
foronPress
action.@girish54321 try this article. It solved my problem. Theming with React navigation