Skip to content

Commit 623afb7

Browse files
Add files via upload
1 parent 2c19f50 commit 623afb7

File tree

11 files changed

+9043
-36
lines changed

11 files changed

+9043
-36
lines changed

Alumno.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
import { StyleSheet, Text, View, Button } from 'react-native';
3+
4+
export default function Alumno(props){
5+
6+
return(
7+
<View>
8+
<Button title={props.nombre} onPress={() => alert(`Alumno: ${props.nombre}`)} />
9+
</View>
10+
)
11+
}

App.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { StatusBar } from 'expo-status-bar';
2+
import { StyleSheet, Text, View } from 'react-native';
3+
import Alumno from './Alumno';
4+
5+
export default function App() {
6+
return (
7+
<View style={styles.container}>
8+
<Alumno nombre="Olga Yadira Ruiz Canizales" />
9+
<StatusBar style="auto" />
10+
</View>
11+
);
12+
}
13+
14+
const styles = StyleSheet.create({
15+
container: {
16+
flex: 1,
17+
backgroundColor: '#fff',
18+
alignItems: 'center',
19+
justifyContent: 'center',
20+
},
21+
});

README.md

Lines changed: 16 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,16 @@
1-
# Instrucciones Ejercicio de Componente reutilizable
2-
Crear un componente de React
3-
4-
Crear aplicación React
5-
1. En terminal: **npx create-expo-app hola-mundo --template**
6-
2. Seleccionar **Blank / En blanco**
7-
3. Escribir el nombre de tu aplicación
8-
4. Correr el comando **npm run web**
9-
5. Puedes presionar en la terminal la tecla i para correr el simuador de iOS o a para el de Android
10-
6. Puedes escanear el código QR y otorgar permisos en tu celular a Expo GO, esto te permitirá abrir tu proyecto en el celular
11-
12-
Crear Componente de React
13-
1. Crear un archivo llamo Alumno.js
14-
2. Lógica del componente:
15-
```javascript
16-
17-
import { StyleSheet, Text, View, Button } from 'react-native';
18-
19-
export default Alumno(props){
20-
21-
return(
22-
<View>
23-
<Text>{props.nombre}</Text>
24-
<Text>{props.matricula}</Text>
25-
</View>
26-
)
27-
}
28-
```
29-
30-
3. Agrega los estilos utilizando el prop style
31-
32-
Importa el componente creado en App.js
33-
1. Para crear una instancia utilizarás la etiqueta <Alumno></Alumno> proporcionando en los props de la forma:
34-
<Alumno nombre="Diego" matricula="123ABC"></Alumno>
35-
2. Implementa diferentes instancias de ese componente
36-
1+
[![Review Assignment Due Date](https://classroom.github.com/assets/deadline-readme-button-22041afd0340ce965d47ae6ef1cefeee28c7c493a6346c4f15d667ab976d596c.svg)](https://classroom.github.com/a/eotZkQWX)
2+
# react-native-expo
3+
Mi primer proyecto de React con Expo GO
4+
5+
6+
1. Instalar Node https://nodejs.org/en/download
7+
2. Probar aplicación
8+
a. Instalar Android Studio para utilizar Simulador de Android en tu computadora https://developer.android.com/studio
9+
b. Instalar la app Expo GO en tu celular para utilizar tu celular para probar la aplicación https://play.google.com/store/apps/details?id=host.exp.exponent&hl=en
10+
4. En terminal: **npx create-expo-app hola-mundo --template**
11+
7. Seleccionar **Blank / En blanco**
12+
8. Escribir el nombre de tu aplicación
13+
9. Correr el comando **npm run web**
14+
10. Puedes presionar en la terminal la tecla i para correr el simuador de iOS o a para el de Android
15+
11. Puedes escanear el código QR y otorgar permisos en tu celular a Expo GO, esto te permitirá abrir tu proyecto en el celular
16+
12. Subir el proyecto en Github. No subir dependencias asegurarse de que el .gitignore esté actualizado

app.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"expo": {
3+
"name": "hola-mundo",
4+
"slug": "hola-mundo",
5+
"version": "1.0.0",
6+
"orientation": "portrait",
7+
"icon": "./assets/icon.png",
8+
"userInterfaceStyle": "light",
9+
"newArchEnabled": true,
10+
"splash": {
11+
"image": "./assets/splash-icon.png",
12+
"resizeMode": "contain",
13+
"backgroundColor": "#ffffff"
14+
},
15+
"ios": {
16+
"supportsTablet": true
17+
},
18+
"android": {
19+
"adaptiveIcon": {
20+
"foregroundImage": "./assets/adaptive-icon.png",
21+
"backgroundColor": "#ffffff"
22+
},
23+
"edgeToEdgeEnabled": true
24+
},
25+
"web": {
26+
"favicon": "./assets/favicon.png"
27+
}
28+
}
29+
}

assets/adaptive-icon.png

17.1 KB
Loading

assets/favicon.png

1.43 KB
Loading

assets/icon.png

21.9 KB
Loading

assets/splash-icon.png

17.1 KB
Loading

index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { registerRootComponent } from 'expo';
2+
3+
import App from './App';
4+
5+
// registerRootComponent calls AppRegistry.registerComponent('main', () => App);
6+
// It also ensures that whether you load the app in Expo Go or in a native build,
7+
// the environment is set up appropriately
8+
registerRootComponent(App);

0 commit comments

Comments
 (0)