Files
Steve Galili 2f4568a29b chore: revamp the cookbook app (#1635)
* create a Jotai examples dir in cookbook with related utils, add state management recipes dir

* add docs with examples

* extract state from component to state, utils, simplify types and custom render func.

* refactor: tweaks & cleanup

* make cookbook app runnable

* update yarn.lock file

* fix TS issue and spelling

* remove duplicate files and adjust testMatch in config to ensure no utils test run

---------

Co-authored-by: stevegalili <steve.galili@mywheels.nl>

refactor: tweak cookbook (#1636)

* refactor: move files around

* refactor: simplify

* chore: remove custom fonts

* chore: tweak eslint

* chore: update yarn.lock
2024-07-16 11:23:36 +02:00

25 lines
579 B
TypeScript

import * as React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import { useUser } from './providers/user-provider';
import { useTheme } from './providers/theme-provider';
export default function WelcomeScreen() {
const theme = useTheme();
const user = useUser();
return (
<View style={styles.container}>
<Text>Hello {user ? user.name : 'Stranger'}</Text>
<Text>Theme: {theme}</Text>
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
},
});