Página da disciplina de pos (Programação Orientada a Serviços) do curso técnico integrado de Informática para Internet.
Objetivos:
app/data/currencies.js
app/screens/CurrencyList.js
app/index.js
app/components/Header
cd CurrencyConverter
yarn start
app/data/currencies.js
mkdir app/data
touch app/data/currencies.js
com editor copie o conteúdo do arquivo do final desta página.
app/screens/CurrencyList.js
touch app/screens/CurrencyList.js
com editor copie o conteúdo do arquivo do final desta página.
app/index.js
Com editor copie o conteúdo do arquivo do final desta página.
Será substituído a apresentação da tela Home
pela tela CurrencyList
app/data/currencies.js
export default [
'AUD',
'BGN',
'BRL',
'CAD',
'CHF',
'CNY',
'CZK',
'DKK',
'EUR',
'GBP',
'HKD',
'HRK',
'HUF',
'IDR',
'ILS',
'INR',
'JPY',
'KRW',
'MXN',
'MYR',
'NOK',
'NZD',
'PHP',
'PLN',
'RON',
'RUB',
'SEK',
'SGD',
'THB',
'TRY',
'USD',
'ZAR',
];
app/screens/CurrencyList.js
import React, { Component } from 'react';
import { FlatList, Text, StatusBar, View } from 'react-native';
import currencies from '../data/currencies';
class CurrencyList extends Component {
handlePress = () => {
console.log('row press');
};
render() {
return (
<View style=>
<StatusBar translucent={false} barStyle="default" />
<FlatList
data={currencies}
renderItem={({ item }) => <Text>{item}</Text>}
keyExtractor={item => item}
/>
</View>
);
}
}
export default CurrencyList;
app/index.js
import React from 'react';
import EStyleSheet from 'react-native-extended-stylesheet';
import CurrencyList from './screens/CurrencyList';
EStyleSheet.build({
$primaryBlue: '#4F6D7A',
$white: '#FFFFFF',
$lightGray: '#F0F0F0',
$border: '#979797',
$inputText: '#797979',
});
export default () => <CurrencyList />;