import React from 'react'; import { Text, TextInput, View, } from 'react-native'; class PizzaTranslator extends React.Component { constructor(props) { super(props); this.state = { text: '' }; } render() { return ( this.setState({ text }) } placeholder="Type here to translate!" style={{ height: 40 }} /> {this.state.text.split(' ').map(word => word && '🍕').join(' ')} ); } } export default PizzaTranslator;