todosLists/Screen/HomeScreen.js

16 lines
436 B
JavaScript
Raw Permalink Normal View History

2022-02-11 08:58:55 +01:00
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>
</>
)
}