bamlab / react-native-image-header-scroll-view

ScrollView with an image in header which becomes a navbar
MIT License
997 stars 99 forks source link

Typing ImageHeaderScrollView && TriggeringView #97

Open HeyrendtCh opened 3 years ago

HeyrendtCh commented 3 years ago

Hi, we have some problems with the ImageHeaderScrollView, a lot of props are necessary and some types are strange.

For example, when we updated our version of your plugin we got errors because of those types

renderFixedForeground: () => React.ElementType; renderForeground?: () => React.ElementType;

Why it's not :

renderFixedForeground: () => React.Element; renderForeground?: () => React.Element;

Like I mentioned, a lot of props are necessary but they are not useful for a basic utilisation :

image

We tried to copy/past your example (in the official doc) and we got a lot of errors,

In our case, we overloaded the index file and we fixed it with our on patch and finally it worked but we want to know if it's a mistake or if we miss something ?

Thank you in advance

Spoutnik97 commented 3 years ago

Hi, thanks for your feedback. I take back this repo after a long period of inactivity by an other collegue. Maybe I have not tested correctly the new version. Could you make a PR to propose your modifcations please ?