react-native-shimmer
react-native-shimmer copied to clipboard
Exception thrown while executing UI block: Attempted to remove non-existent subview
https://github.com/software-mansion/react-native-reanimated/issues/2554
Description
I am using react-native-shimmer. when I update [email protected] and [email protected] then I am receiving the below error
Exception thrown while executing UI block: Attempted to remove non-existent subview
at
https://github.com/software-mansion/react-native-reanimated/blob/ce76e66aaf47c26bb1ff818d72a50b55e092ca05/ios/LayoutReanimation/REAAnimationsManager.m#L101
because it has conflict with react-native-shimmer
Expected behavior
Should not throw the error.
Actual behavior & Steps To Reproduce
Repro: https://github.com/nomi9995/ReproNonExistentsubview Throws an error but still works if I just close it.
just installed Package versions which I added below.
then below code will reproduce this error
import React, {useState} from 'react';
import {SafeAreaView, StyleSheet, Text, View, Button} from 'react-native';
import Shimmer from 'react-native-shimmer';
const App = () => {
const [isVisible, setIsVisible] = useState<boolean>(true);
return (
<SafeAreaView style={styles.container}>
{isVisible && (
<Shimmer>
<Text>Loading...</Text>
</Shimmer>
)}
<Button
onPress={() => setIsVisible(!isVisible)}
title={isVisible ? 'Hide' : 'Visible'}
/>
</SafeAreaView>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
},
});
export default App;
Package versions
- React Native: ^v0.66.1
- React Native Reanimated: ^2.3.0-alpha.3
- react-native-shimmer: ^0.6.0
Affected platforms
- [ ] Android
- [X] iOS
- [ ] Web