'(React Native) Render error Value is undefined expected object
So I was making a todo app and i encountered an error
Error
Render Error
Value is undefined expected object
Code of Main.tsx
<Center _dark={{bg: 'blueGray.900'}} _light={{bg: 'blueGray.50'}} px={4} flex={1}>
<VStack space={5} alignItems="center">
<Box w="100px" h="100px">
<AnimatedCheckBox />
</Box>
<Box p={10} bg={useColorModeValue('red.500', 'yellow.500')}>
<Text>
Hello World
</Text>
</Box>
<ThemeToggle />
</VStack>
</Center>
and the code of the Animated Check Box Component
Does anyone knows what is causing this error. If you do plz do tell me with the solution it will help me a lot.
Solution 1:[1]
If you are code is correct, then you need open tab for center is missing.
<Center>
<VStack space={5} alignItems="center">
<Box w="100px" h="100px">
<AnimatedCheckBox />
</Box>
<Box p={10} bg={useColorModeValue('red.500', 'yellow.500')}>
<Text>
Hello World
</Text>
</Box>
<ThemeToggle />
</VStack>
</Center>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Nirmalsinh Rathod |


