View config getter callback for component 'div' must be a function

Viewed 30

Unsure where this error is coming from, I cannot find any resource online to answer this question that is relevant to my code.

For context ReactCardFlip is a library and not a custom component I am using.

Code snippet receiving the error in emulator:

export default function Alphabet({navigation}){

//for dark mode
const {colors} = useTheme();

const [isFlipped, setIsFlipped] = useState(false);

const handleClick = () => {
    setIsFlipped(!isFlipped);
};

return(
    <ReactCardFlip isFlipped={isFlipped} flipDirection="vertical">
    <View>
      <Text>This is the front of the card.</Text>
      <Button
      title = "front" 
      onPress={handleClick}>Click to flip</Button>
    </View>

    <View>
      <Text>This is the back of the card.</Text>
      <Button
      title = "back"
      onPress={handleClick}>Click to flip</Button>
    </View>
  </ReactCardFlip>
)

Error:

enter image description here

0 Answers
Related