DylanVann / react-native-fast-image

🚩 FastImage, performant React Native image component.
MIT License
8.21k stars 1.51k forks source link

[Android] Image disappears when using react-native-screens #767

Open MiloszFilimowski opened 3 years ago

MiloszFilimowski commented 3 years ago

Describe the bug On Android when I want to close a screen, it first hides the images inside the screen and then pop's the screen.

To Reproduce Steps to reproduce the behavior if possible, or a link to a reproduction repo:

  1. Open the reproduction project
  2. Click next page
  3. Use hardware back button to go back
  4. See that image is hidden before transition.

Please take a look at this issue: https://github.com/software-mansion/react-native-screens/issues/797

Seem likes the issue is somewhere between react-native-fast-image and react-native-screens. Based on the reproduction example you can see that using createStackNavigator instead of createNativeStackNavigator fixes the issue as well as using Image(from react-native) instead of one from react-native-fast-image.

I also noticed that commenting out requestManager.clear(view) in onDropViewInstance in node_modules/react-native-fast-image/android/src/main/java/com/dylanvann/fastimage/FastImageViewManager.java also fixes the issue.

However I don't have enough knowledge about any of this projects to investigate in further.

trickeyd commented 3 years ago

Did you ever find a solution to this?

JEGardner commented 3 years ago

I am also hitting this issue after upgrading from createStackNavigator to createNativeStackNavigator. The image appears fine, but disappears during the transition when navigating back via either the hardware button or function call from in the app. Does anyone have any ideas?

safwenbelkassem commented 3 years ago

use this fork https://github.com/safwenbelkassem/react-native-fast-image.git

zhuanghongji commented 3 years ago

Hitting the issue when using createNativeStackNavigation in react-navigation 6.x,did author plan to fix it ?

enzomanuelmangano commented 3 years ago

Same here. I'm using createNativeStackNavigation from react-navigation

henrymoulton commented 2 years ago

@safwenbelkassem is this issue still open?

renanbronchart commented 1 year ago

I still have the problem, Is someone have a solution for that?

Steytz commented 2 months ago

There seems to be an issue also with the transition, sometimes it causes the image to fully disappear, no matter if placeholder or not. As soon as i remove the transition or set the duration to 0, it fixes the issue. My first guess would be that it has to do with re rendering too quickly somehow causing the transition logic to break.