mirror of
https://github.com/callstack/react-native-testing-library.git
synced 2026-09-18 23:09:04 +08:00
2f4568a29b
* 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
25 lines
579 B
TypeScript
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',
|
|
},
|
|
});
|