Skip to content
This repository has been archived by the owner on Feb 25, 2020. It is now read-only.

Commit

Permalink
fix: make it possible to run example app (#226)
Browse files Browse the repository at this point in the history
  • Loading branch information
vonovak committed Feb 6, 2020
1 parent 155d839 commit df50e64
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
4 changes: 3 additions & 1 deletion example/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as React from 'react';
import { registerRootComponent } from 'expo';
import { View, TouchableOpacity, StyleSheet } from 'react-native';
import {
Assets as StackAssets,
Expand Down Expand Up @@ -130,4 +131,5 @@ const styles = {
},
};

export default App;
// @ts-ignore
registerRootComponent(App);
2 changes: 1 addition & 1 deletion example/src/Shared/Chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const MESSAGES = [
'make me a sandwich',
];

export default class Albums extends React.Component {
export default class Chat extends React.Component {
render() {
return (
<View style={styles.container}>
Expand Down
23 changes: 16 additions & 7 deletions example/src/Shared/Contacts.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { View, Text, StyleSheet, FlatList } from 'react-native';
import { View, Text, StyleSheet, FlatList, TextInput } from 'react-native';

type Item = { name: string; number: number };

Expand Down Expand Up @@ -85,12 +85,18 @@ export default class Contacts extends React.Component {

render() {
return (
<FlatList
data={CONTACTS}
keyExtractor={(_, i) => String(i)}
renderItem={this._renderItem}
ItemSeparatorComponent={this._ItemSeparator}
/>
<>
<TextInput
style={styles.textInput}
value="readonly textinput to see how tab bar behaves w/ keyboard"
/>
<FlatList
data={CONTACTS}
keyExtractor={(_, i) => String(i)}
renderItem={this._renderItem}
ItemSeparatorComponent={this._ItemSeparator}
/>
</>
);
}
}
Expand Down Expand Up @@ -130,4 +136,7 @@ const styles = StyleSheet.create({
height: StyleSheet.hairlineWidth,
backgroundColor: 'rgba(0, 0, 0, .08)',
},
textInput: {
height: 50,
},
});

0 comments on commit df50e64

Please sign in to comment.