Giter Site home page Giter Site logo

meu-app-saude's Introduction

Projeto react-native na máquina cd\ -> voltar raiz mkdir workspace cd workspace

código para criar projeto react-native: npx create-expo-app --template blank meu-app y


executar o app npx expo start


Exemplo simples de navegação de tela // In App.js in a new project

import * as React from 'react'; import { View, Text, Button } from 'react-native'; import { NavigationContainer } from '@react-navigation/native'; import { createNativeStackNavigator } from '@react-navigation/native-stack';

function HomeScreen({ navigation }) { return ( <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}> Home Screen <Button title='Perfil' onPress={() => navigation.navigate('Perfil')}/> <Button title='Configuração' onPress={() => navigation.navigate('Config')}/> ); }

function ProfileScreen() { return ( <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}> Página de perfil ); }

function ConfigScreen() { return ( <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}> Tela de Configuração ); }

const Stack = createNativeStackNavigator();

function App() { return ( <Stack.Navigator initialRouteName=''> <Stack.Screen name="Inicio" component={HomeScreen} options={{ title: 'Início' }} /> <Stack.Screen name="Perfil" component={ProfileScreen} options={{ title: 'Perfil' }} /> <Stack.Screen name="Config" component={ConfigScreen} options={{ title: 'Configuração' }} /> </Stack.Navigator> ); }

export default App;

Instalar biblioteca para manipulação de tela npm install @react-navigation/native

Installing dependencies into an Expo managed project In your project directory, run: npx expo install react-native-screens react-native-safe-area-context

Stack Navigator - O Stack Navigator fornece uma maneira para seu aplicativo fazer a transição entre telas, onde cada nova tela é colocada no topo de uma pilha. npm install @react-navigation/stack

Styled-Components -> npm install styled-components

Repositório Maeda

meu-app-saude's People

Contributors

thzinho3 avatar

Watchers

MAugusto89 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.