Unhandled Runtime Error Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
Check the render method of Title.
import Link from "../src/components/Link"
import React from "react";
function Title({children, as}){
const Tag = as;
return (
<React.Fragment>
<Tag style={styles.title}>
{children}
</Tag>
</React.Fragment>
);
}
const styles = {
title: {
color:'blue',
fontFamily: "sans-sarif",
}
}
export default function HomePage(){
return (
<div>
<Title> Alura Cases - Home</Title>
<Link href="/faq">
Ir para página do FAQ
</Link>
</div>
);
}