Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.
#jetbrains
.idea
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

あ。


# expo
.expo/

# dependencies
/node_modules

Expand Down
27 changes: 19 additions & 8 deletions App.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,27 @@
import React, { Component } from 'react';
import { AppRegistry, Text, View } from 'react-native';
import { AppRegistry, Text, TextInput, View } from 'react-native';


export default class PizzaTranslator extends Component {
constructor(props) {
super(props);
this.state = {text: ''};
}

export default class App extends Component {
render() {
return (
<View>
<Text>Open up App.js to start working on your app!</Text>
<Text>Changes you make will automatically reload.</Text>
<Text>Shake your phone to open the developer menu.</Text>
</View>
<View style={{padding: 10}}>
<TextInput
style={{height:40}}
placeholder="Type here to translate"
onChangeText={(text) => this.setState({text})}
/>
<Text style={{padding:10, fontSize:42}}>
{this.state.text.split(' ').map((word) => word && '🍕').join(' ')}
</Text>
</View>
);
}
}

AppRegistry.registerComponent('react-native-tutorial', () => App);
AppRegistry.registerComponent('react-native-tutorial', () => PizzaTranslator);