[[oktatas:telefon:react_native|< React Native]] ====== Todo ====== * **Szerző:** Sallai András * Copyright (c) Sallai András, 2021 * Licenc: [[https://creativecommons.org/licenses/by-sa/4.0/|CC Attribution-Share Alike 4.0 International]] * Web: https://szit.hu ===== Lista ===== import React from 'react'; import { StyleSheet, View } from 'react-native'; import { FlatList, Text } from "react-native"; import { useState } from 'react'; import Header from './components/header'; export default function App() { const [todos, setTodos] = useState([ { task: 'Angular tanulás', id: '1' }, { task: 'ReactNative tanulás', id: '2' }, { task: 'Tisztkód tanulás', id: '3' }, { task: 'JavaFX tanulás', id: '4' }, ]); const renderItem = ({item}) => ( {item.task} ); return (
item.task} /> ); } const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: '#fff', alignItems: 'center', justifyContent: 'center', }, task: { fontSize: 22, }, }); import React from "react"; import { StyleSheet, Text, View } from "react-native"; export default function Header() { return ( Fejrész ); } const styles = StyleSheet.create({ header: { height: 80, width: '100%', backgroundColor: 'coral', }, title: { fontSize: 32, textAlign: 'center', paddingTop: 10, fontWeight: 'bold', color: 'white', }, });