Open
Description
- I have searched existing issuesI am using the latest scrollable tab view version
I've just update react-native-scrollable-tab-view to 1.0.0 by yarn. But still have error.
Steps to Reproduce
yarn add react-native-scrollable-tab-view@1.0.0
import ScrollableTabView, { ScrollableTabBar } from 'react-native-scrollable-tab-view';
....
<ScrollableTabView
style={{ marginTop: 0, marginBottom: 10, height: 50, flex: 0 }}
onChangeTab={this...}
initialPage={0}
renderTabBar={() => (
<ScrollableTabBar
activeTextColor="..."
inactiveTextColor="..."
style={{
...
}}
tabsContainerStyle={{
...
}}
underlineStyle={{
height: 2,
...
}}
tabStyle={{
...
}}
textStyle={{ fontSize: 12, fontWeight: 'normal' }}
/>
)}
>
{metrics.map(metricName => (
<View
key={metricName}
tabLabel={metricName}
>
<Text>{metricName}</Text>
</View>
))}
</ScrollableTabView>
Expected Behavior
Should work because I setup latest version of module. And in yarn.lock
:
also ViewPager
there is in node_modules
:
Actual Behavior
Android
iOS
All fine.
I've try
- Clean yarn cache
- Clean react native & metro cache
- rm -rf node_modules
- delete build folders
Activity
zmnv commentedon Oct 29, 2019
I look at:
/node_modules/react-native-scrollable-tab-view/index.js
Why do you use
Animated.ScrollView
for iOS andAnimatedViewPagerAndroid
for Android? Can you useAnimated.ScrollView
for all?also there are definitions which don't used
zmnv commentedon Oct 29, 2019
temporary solution is just:
but I don't want to install that module direct into project :(
ptomasroos commentedon Oct 29, 2019
I would love to have a PR on a scroll based solution of android. It’s there for historical reasons.
haack commentedon Oct 31, 2019
I have the same issue on Android. Manually adding
@react-native-community/viewpager
didn't solve the problem for me.zunsakai commentedon Oct 31, 2019
same issue ...
cereme commentedon Nov 2, 2019
I have same issue too
vetrivendhan48 commentedon Nov 4, 2019
I guess there will be no issue in doing that I guess. npm will manage dependencies right? Is there will be any issue will come if you modify its dependencies? Please let me know.
Thanks
zmnv commentedon Nov 4, 2019
@vetrivendhan48 not a big deal actually, but.
But when you search in project directory
@react-native-community/viewpager
it's returns nothing. Then other developers thinks like 'oh, that dependency is not used in project so it unnecessary, I can delete it!'.And build fails next time)))))))
also guys above says that solution didn't work. I don't know why. In my case it works.
azamouchi commentedon Nov 6, 2019
yarn add @react-native-community/viewpager
on it's own does not solve the issue, you need to link the package also usingreact-native link @react-native-community/viewpager
w13808604 commentedon Nov 8, 2019
same issue ..anybody solve it
chenyanfei-m commentedon Nov 8, 2019
yarn add @react-native-community/viewpager
react-native link @react-native-community/viewpager
and rebuild, solve it ✨
mastahed commentedon Nov 12, 2019
Any fix for expo 35 with RN 0.59? works well on IOS, android shows the same error. Tried link and manual installation of viewpager.
kaiyes commentedon Nov 18, 2019
This worked for me
xgAnd commentedon Nov 18, 2019
worked react-native version is 0.61.3
31 remaining items