Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

renderForeground (in version 1.0) does not display content when using react navigation 6 #131

Open
butri71 opened this issue Aug 27, 2023 · 1 comment

Comments

@butri71
Copy link

butri71 commented Aug 27, 2023

I've been using version 0.10.3 with react navigation 5 with no problem for the past 2 years.

I've recently upgraded to react navigation 6 which force me to upgrade to "react-native-image-header-scroll-view": "^1.0.0" since any previous version has a conflict of dependencies.

With using 1.0 I have to change ImageHeaderScrollView instead of HeaderImageScrollView and import it like this otherwise it would give an error import { ImageHeaderScrollView, TriggeringView } from 'react-native-image-header-scroll-view';

Everything works as before except the content inside the renderFixedForeground() is no longer shown and no error is thrown.

Can you please if this library is still maintained?

Appreciate any help in advance!

@Shahfaisal-0304
Copy link

Solution:
We needed to replace the legacy context. I used React.createContext in the ImageHeaderScrollView.js file, exported it, and then imported it into the TrigerringView file, using it as static contentType as suggested by the RN logs. (fixed).

https://github.com/user-attachments/files/16958582/Archive.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants