Skip to content

setColorScheme don't change the theme #97

@Bryant-Anjos

Description

@Bryant-Anjos

Hi! I'm trying to change the app theme when the user changes it inside the app. But it's not working.
The code example is below.
Is there something wrong?

useEffect(() => {
  tw.setColorScheme(darkTheme ? 'dark' : 'light')
}, [darkTheme])

<View style={tw`bg-white dark:bg-gray-900`}>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions