Skip to content

Commit 7b3454e

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

File tree

1 file changed

+18
-7
lines changed

1 file changed

+18
-7
lines changed

packages/react-native/App.js

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

99
import React, {useState} from 'react';
10-
import {Button, StyleSheet, ScrollView, View, Text} from 'react-native';
10+
import {
11+
Button,
12+
StyleSheet,
13+
ScrollView,
14+
View,
15+
Text,
16+
TextInput,
17+
} from 'react-native';
1118

1219
import {Colors} from 'react-native/Libraries/NewAppScreen';
1320

@@ -44,16 +51,20 @@ const App: () => Node = () => {
4451
<View style={styles.sectionContainer}>
4552
<Text style={styles.sectionTitle}>AWS SDK for JavaScript (v2):</Text>
4653
<Button title="Call with v2" onPress={fetchV2Response} />
47-
<ScrollView style={styles.resultWindow}>
48-
<Text style={styles.sectionDescription}>{v2Response}</Text>
49-
</ScrollView>
54+
<TextInput
55+
style={styles.sectionDescription}
56+
placeholder="v2 response will be populated here"
57+
value={v2Response}
58+
/>
5059
</View>
5160
<View style={styles.sectionContainer}>
5261
<Text style={styles.sectionTitle}>AWS SDK for JavaScript (v3):</Text>
5362
<Button title="Call with v3" onPress={fetchV3Response} />
54-
<ScrollView style={styles.resultWindow}>
55-
<Text style={styles.sectionDescription}>{v3Response}</Text>
56-
</ScrollView>
63+
<TextInput
64+
style={styles.sectionDescription}
65+
placeholder="v3 response will be populated here"
66+
value={v3Response}
67+
/>
5768
</View>
5869
</View>
5970
);

0 commit comments

Comments
 (0)