0
how to solve this error?( TypeError: Cannot read property 'name' of undefined)
import React from "react"; import {Box,Typography} from '@material-ui/core'; const Information =({data})=> { return ( <Box> <Typography>Location {data.name}</Typography> </Box> ) } export default Information;
2 Antworten
+ 1
Shweta
Before you can understand and solve this problem, do you understand what is {data} means in function component below:
const Information = ({data}) => {
}
?
How do you call this function component in jsx, eg. <Information .... />?