0

So I was making a todo app and i encountered an error

Error

Render Error
Value is undefined expected object

enter image description here

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

enter image description here

Does anyone knows what is causing this error. If you do plz do tell me with the solution it will help me a lot.

1 Answers1

0

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>
Nirmalsinh Rathod
  • 5,079
  • 4
  • 26
  • 56