React Native

De BrapciWiki
Ir para navegação Ir para pesquisar

https://reactnative.dev/docs/getting-started

npm install --global expo-cli

Criar uma aplicação

expo init teste1
npm start
npm run android
npm run ios
npm run web

Componentes

npm install @react-navigation/stack --save
npm install @react-navigation/native --save
<View>
<Text>
     <TextInput
       style=Predefinição:Height: 40
       placeholder="Type here to translate!"
       onChangeText={text => setText(text)}
       defaultValue={text}
     />
     <Text style=Predefinição:Padding: 10, fontSize: 42>
       {text.split(' ').map((word) => word && '🍕').join(' ')}
     </Text>

Image

<Image>
     <Image
       source=Predefinição:Uri: "https://reactnative.dev/docs/assets/p cat1.png"
       style=Predefinição:Width: 200, height: 200
     />
<ScrollView>
<TextInput>

Button

     <Button
       onPress={() => {
         setIsHungry(false);
       }}
       disabled={!isHungry}
       title={isHungry ? "Pour me some milk, please!" : "Thank you!"}
     />

Iniciar server

Inicar o React para desenvolvimento e testes

yarn start

Bibliotecas

https://www.youtube.com/watch?v=71shcOjC_a4