Untitled

 avatar
unknown
plain_text
2 days ago
497 B
10
Indexable
import { Theme, useTheme } from "@/constants/theme";
import { useMemo } from "react";
import { StyleSheet, View } from "react-native";

export default function ExampleComponent() {
    const { theme } = useTheme();
    const styles = useMemo(() => createStyles(theme), [theme]);
    return (<View style={styles.main} />)
}

const createStyles = (theme: Theme) =>
    StyleSheet.create({
        main: {
            backgroundColor: theme.BACKGROUND,
            height: "100%",
        },
    });
Editor is loading...
Leave a Comment