Skip to content

Commit 1fbcdae

Browse files
committed
use array index as a key for children
1 parent 23c24b3 commit 1fbcdae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ const ScrollableTabView = React.createClass({
135135
{...this.props.contentProps}>
136136
{this._children().map((child, idx) => {
137137
return <View
138-
key={child.props.tabLabel + '_' + idx}
138+
key={child.key}
139139
style={{width: this.state.containerWidth, }}>
140140
{child}
141141
</View>;
@@ -159,7 +159,7 @@ const ScrollableTabView = React.createClass({
159159
{...this.props.contentProps}>
160160
{this._children().map((child, idx) => {
161161
return <View
162-
key={child.props.tabLabel + '_' + idx}
162+
key={child.key}
163163
style={{width: this.state.containerWidth, }}>
164164
{child}
165165
</View>;

0 commit comments

Comments
 (0)