Skip to content

Commit 423aabe

Browse files
authored
Merge pull request ptomasroos#567 from vonovak/patch-2
avoid creating new object for each button
2 parents 9374590 + a5c707b commit 423aabe

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

DefaultTabBar.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const DefaultTabBar = React.createClass({
3939
const fontWeight = isTabActive ? 'bold' : 'normal';
4040

4141
return <Button
42-
style={{flex: 1, }}
42+
style={styles.flexOne}
4343
key={name}
4444
accessible={true}
4545
accessibilityLabel={name}
@@ -88,6 +88,9 @@ const styles = StyleSheet.create({
8888
justifyContent: 'center',
8989
paddingBottom: 10,
9090
},
91+
flexOne: {
92+
flex: 1,
93+
},
9194
tabs: {
9295
height: 50,
9396
flexDirection: 'row',

0 commit comments

Comments
 (0)