Skip to content
This repository was archived by the owner on Mar 3, 2021. It is now read-only.
This repository was archived by the owner on Mar 3, 2021. It is now read-only.

theme is not changing when using useLayoutEffect #62

@elie-chaaban

Description

@elie-chaaban

Hello,

I have this code in a screen:

import { useTheme } from "@react-navigation/native";
const { colors } = useTheme();
useLayoutEffect(() => {
navigation.setOptions({
headerRight: () => (
<Text styles={color: colors.text}}>TEST
),
});
}, [badge]);

If I go and change the iPhone settings to dark or light, the text does not change unless i refresh the page or hot reload when using expo, how can i solve it, everything is working perfectly except such thing

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions