todosLists/Screen/HomeScreen.js
2022-02-11 08:58:55 +01:00

16 lines
436 B
JavaScript

import React, { useContext } from 'react'
import { Text } from 'react-native'
import { UsernameContext, TokenContext } from '../Context/Context'
export default function HomeScreen() {
const [username, setUsername] = useContext(UsernameContext)
const [token, setToken] = useContext(TokenContext)
return (
<>
<Text>Welcome !</Text>
<Text>You are logged as {username}</Text>
<Text>{token}</Text>
</>
)
}