react-native-svg-transformer
react-native-svg-transformer copied to clipboard
Local SVG disappearing just before transition from a given screen
https://user-images.githubusercontent.com/43211102/128126864-51344805-dc43-40cb-823e-d115fb0b39ab.mp4
I am facing this bug where the local svgs disappear after navigating back from that screen which contains those svgs. In this case, the svgs are positioned absolutely on both merchant and refund list screen, but disappear as soon as I press back. Any help is appreciated.
react: 17.0.1 react-native: 0.64.2 react-native-svg: 12.1.1 react-native-svg-transformer: 0.14.3 @react-navigation/native-stack: 6.0.0 @react-navigation/native: 6.0.0
Thanks @t3chcrazy ! I'm not really sure how I could help you with this one. Basically instead of a whole app, there would need to be some simpler example to reproduce the issue that you are having.
I'm also experiencing this with the same stack, did you manage to get over it somehow ?
same problem here too.
@dev-andremonteiro No I couldn't, I had to replace them with png files
I solved it by switching to stack navigation from native stack. I know for someone it is not possible to just let go native stack's performance. But for me it was fine.
Switching back to navigation stack from native stack worked for me.
This is still a problem for native stack and react-native-screens. Anyone have a solution for that? It looks really bad.
Thanks @t3chcrazy ! I'm not really sure how I could help you with this one. Basically instead of a whole app, there would need to be some simpler example to reproduce the issue that you are having.
You just need to have some local png files rendered inside a NativeStackNavigator
imported from @react-navigation/native-stack
.
Then just go back on android for example and you will see the local icons disappearing before the screen is unmounted from the stack.
Maybe it is because of animation duration of navigator that is defaulted on 350ms
. Animation occurs on native thread and imported icons from javascript side are removed from memory too soon?
https://github.com/software-mansion/react-native-screens/issues/773