I'm rendering two Chakra UI components based in a variable loading:
{loading ? (<Spinner>) : (<Text color={useColorModeValue('gray.800', 'gray.400')>Hi</Text) }
But the IDE is warning me about this:
ESLint: React Hook "useColorModeValue" is called conditionally. React Hooks must be called in the exact same order in every component render.
How should I render those components? useColorModeValue is a hook