This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { useState } from "react"; | |
| import { Modal, StyleSheet, Text, TouchableOpacity, View } from "react-native"; | |
| const export default App = () => { | |
| const [modalVisible, setModalVisible] = useState(false); | |
| return ( | |
| <View style={styles.centeredView}> | |
| <Modal animationType= "fade" | |
| transparent= {true} | |
| visible= {modalVisible}> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { useEffect, useState } from 'react'; | |
| import { Platform, StyleSheet, View, TextInput, TouchableOpacity, Alert, Text } from 'react-native'; | |
| export default function UselessTextInput() { | |
| const [value, onChangeText] = React.useState(null); | |
| checkSwitch = () => { | |
| if (value == '1') { | |
| this.ONE(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { useEffect, useState } from 'react'; | |
| import { Platform, StyleSheet, View, TextInput, TouchableOpacity, Alert, Text } from 'react-native'; | |
| export default function UselessTextInput() { | |
| const [value, onChangeText] = React.useState(null); | |
| checkSwitch = () => { | |
| switch(value) { | |
| case '1': |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { useState, useEffect } from "react"; | |
| import { StyleSheet, Text, TouchableOpacity, View } from "react-native"; | |
| export default App = () => { | |
| const [count, setCount] = useState(0); | |
| const [result_add, add] = useState(0); | |
| const [result_substraction, substraction] = useState(0); | |
| const [operattion, setOperattion] = useState(null); | |
| const onAddCount= () => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, {useState, useEffect, useRef} from 'react'; | |
| import { View, Text, FlatList, Image } from 'react-native'; | |
| const ITEM_HEIGHT = 70; | |
| const itemList = [ | |
| {id: '1', name: 'Kepa Arrizabalaga', country: 'Spain', image: 'https://resources.premierleague.com/premierleague/photos/players/250x250/p109745.png'}, | |
| {id: '2', name: 'Antonio Rüdiger', country: 'Germany', image: 'https://resources.premierleague.com/premierleague/photos/players/110x140/p102380.png'}, | |
| {id: '3', name: 'Marcos Alonso', country: 'Spain', image: 'https://resources.premierleague.com/premierleague/photos/players/250x250/p82263.png'}, | |
| {id: '4', name: 'Andreas Christensen', country: 'Denmark', image: 'https://resources.premierleague.com/premierleague/photos/players/250x250/p135363.png'}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, {useState, useEffect, useRef} from 'react'; | |
| import { View, Text, FlatList, Image } from 'react-native'; | |
| const ITEM_HEIGHT = 70; | |
| const itemList = [ | |
| {id: '1', name: 'Kepa Arrizabalaga', country: 'Spain', image: 'https://resources.premierleague.com/premierleague/photos/players/250x250/p109745.png'}, | |
| {id: '2', name: 'Antonio Rüdiger', country: 'Germany', image: 'https://resources.premierleague.com/premierleague/photos/players/110x140/p102380.png'}, | |
| {id: '3', name: 'Marcos Alonso', country: 'Spain', image: 'https://resources.premierleague.com/premierleague/photos/players/250x250/p82263.png'}, | |
| {id: '4', name: 'Andreas Christensen', country: 'Denmark', image: 'https://resources.premierleague.com/premierleague/photos/players/250x250/p135363.png'}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, {useState} from 'react'; | |
| import { StyleSheet, Text, View, Switch } from 'react-native'; | |
| export default function App () { | |
| const [switchValue, setSwitchValue] = useState(false); | |
| return ( | |
| <View style={styles.container}> | |
| <Text style={styles.textStyle}>Switch Example</Text> | |
| <Text style={styles.textStyle}>{switchValue ? 'on' :'off'}</Text> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, {useState} from 'react'; | |
| import { StyleSheet, Text, View, Button, Modal } from 'react-native'; | |
| export default function App () { | |
| const [showModal, setModalStatus] = useState(false); | |
| return ( | |
| <View style = {styles.container}> | |
| <Modal | |
| animationType = {"fade"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Sample React Native App | |
| * https://github.com/facebook/react-native | |
| * | |
| * @format | |
| * @flow | |
| */ | |
| import React, { Component } from "react"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Sample React Native App | |
| * https://github.com/facebook/react-native | |
| * | |
| * @format | |
| * @flow | |
| */ | |
| import React, { Component } from 'react'; |
NewerOlder