Commit ef7f4f1231acf9e37936df2ffa041089f5425c32
dx: refactor to add react keys in rendering TopBar
Andre Staltz committed on 4/29/2020, 3:33:56 PMParent: feab8686fe3b62d21cac16f5c5aa4c414561d01b
Files changed
src/frontend/components/TopBar.ts | changed |
src/frontend/components/TopBar.ts | ||
---|---|---|
@@ -65,16 +65,17 @@ | ||
65 | 65 | public render() { |
66 | 66 | const {title, onPressBack} = this.props; |
67 | 67 | return $(View, {style: styles.container}, [ |
68 | 68 | $(HeaderButton, { |
69 | + key: 'back', | |
69 | 70 | onPress: onPressBack, |
70 | 71 | icon: Platform.select({ios: 'chevron-left', default: 'arrow-left'}), |
71 | 72 | ...Platform.select({ios: {iconSize: Dimensions.iconSizeLarge}}), |
72 | 73 | accessibilityLabel: 'Back Button', |
73 | 74 | }), |
74 | - title ? $(Text, {style: styles.title}, title) : null, | |
75 | + title ? $(Text, {key: 'title', style: styles.title}, title) : null, | |
75 | 76 | this.props.children |
76 | - ? $(View, {style: styles.rightSide}, this.props.children) | |
77 | + ? $(View, {key: 'right', style: styles.rightSide}, this.props.children) | |
77 | 78 | : null, |
78 | 79 | ]); |
79 | 80 | } |
80 | 81 | } |
Built with git-ssb-web