Complete the code to export a React component that renders a heading.
export default function Home() {
return <h1>[1]</h1>;
}The component must return valid JSX. The heading text should be a string inside quotes.
Complete the code to statically export a page component in Next.js.
export default function [1]() { return <main>Static content</main>; }
The default export function name can be anything, but 'Home' is a common convention for the main page.
Fix the error in the static page component by completing the return statement.
export default function About() {
return [1];
}The return must be valid JSX. It needs to be wrapped in a tag like <div>.
Fill both blanks to create a static page that renders a section with a heading.
export default function Contact() {
return <[1]><h2>[2]</h2></[1]>;
}The outer tag should be <section> for semantic meaning, and the heading text should be 'Contact us'.
Fill all three blanks to create a static Next.js page with a header, main, and footer.
export default function Layout() {
return (
<>
<[1]><h1>Site Title</h1></[1]>
<[2]><p>Welcome to our site.</p></[2]>
<[3]><small>Ā© 2024</small></[3]>
</>
);
}Use semantic HTML5 tags: <header> for the top, <main> for main content, and <footer> for the bottom.