Why this component is not rendering in react js.It shows the error message Unhandled Runtime Error Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
This is my component
function Test({session}) {
const RenderPage=fetchComment &&(
fetchComment?.map((comment)=>{
return <LoadComment
key={i}
timestamp={comment.timestamp?.toDate()}
comment={comment.comment}
image={comment.image}
user={comment.user} />
})
)
return (
<RenderPage></RenderPage>
)
}