Skip to content

Commit f30c164

Browse files
committed
chore(react-native): populate SDK response in TextInput
1 parent 387b9c0 commit f30c164

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

packages/react-native/App.js

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88

99
import React, {useState} from 'react';
10-
import {Button, StyleSheet, ScrollView, View, Text} from 'react-native';
10+
import {Button, StyleSheet, View, Text, TextInput} from 'react-native';
1111

1212
import {Colors} from 'react-native/Libraries/NewAppScreen';
1313

@@ -44,16 +44,20 @@ const App: () => Node = () => {
4444
<View style={styles.sectionContainer}>
4545
<Text style={styles.sectionTitle}>AWS SDK for JavaScript (v2):</Text>
4646
<Button title="Call with v2" onPress={fetchV2Response} />
47-
<ScrollView style={styles.resultWindow}>
48-
<Text style={styles.sectionDescription}>{v2Response}</Text>
49-
</ScrollView>
47+
<TextInput
48+
style={styles.sectionDescription}
49+
placeholder="v2 response will be populated here"
50+
value={v2Response}
51+
/>
5052
</View>
5153
<View style={styles.sectionContainer}>
5254
<Text style={styles.sectionTitle}>AWS SDK for JavaScript (v3):</Text>
5355
<Button title="Call with v3" onPress={fetchV3Response} />
54-
<ScrollView style={styles.resultWindow}>
55-
<Text style={styles.sectionDescription}>{v3Response}</Text>
56-
</ScrollView>
56+
<TextInput
57+
style={styles.sectionDescription}
58+
placeholder="v3 response will be populated here"
59+
value={v3Response}
60+
/>
5761
</View>
5862
</View>
5963
);

0 commit comments

Comments
 (0)