ptomasroos / react-native-scrollable-tab-view

Tabbed navigation that you can swipe between, each tab can have its own ScrollView and maintain its own scroll position between swipes. Pleasantly animated. Customizable tab bar
https://www.npmjs.com/package/react-native-scrollable-tab-view
6.94k stars 2.28k forks source link

Cannot use CustomTabBar #473

Closed rithvikvibhu closed 6 years ago

rithvikvibhu commented 8 years ago

So i copied the DefaultTabBar.js to app root and renamed it to CustomTabBar.

Tried importing it like

CustomTabBar = require('./CustomTabBar');

and changing the import for Button (in CustomTabBar.js):

import Button from 'react-native-scrollable-tab-view';

It works (sort of). The tabs don't show text and the border is blue throughout. I wanted to know why the same piece of code wouldn't work when importing from module and from another file. Any ideas?

rithvikvibhu commented 8 years ago

Also, there's a warning: Each child in an array or iterator should have a unique "key" prop. Check the render method of 'DefaultTabBar'. See https://fb.me/react-warning-keys for more information

in Button (created by DefaultTabBar)
in DeafultTabBar (created by ScrollableTabView)
in RCTView (created by View)
in ScrollableTabView (created by CustomTabBar)
in RCTView (created by View)
in CustomTabBar (created by ScrollableTabView)
in RCTView (created by View)
in View (created by ScrollableTabView)
in ScrollableTabView (created by *****appnamehere****)
... and stuff
Nicomalacho commented 7 years ago

Same here, RN 0.37

soriac commented 7 years ago

Getting the same warning, RN 0.42

skv-headless commented 7 years ago

Please make a repo showing this bug and I will take a look

iLeonelPerea commented 7 years ago

Did you fixed it ? i have the same error