Complete the code to create a new Next.js app using the command line.
npx create-next-app@latest [1]The command npx create-next-app@latest my-next-app creates a new Next.js app named my-next-app.
Complete the command to start the Next.js development server.
cd my-next-app && npm run [1]The command npm run dev starts the Next.js development server for live coding.
Fix the error in the Next.js app entry point import statement.
import { [1] } from 'next/app';
The correct import is import { AppProps } from 'next/app'; to use the AppProps type in your custom App component.
Fill both blanks to create a basic Next.js page component.
export default function [1]() { return <[2]>Hello Next.js!</[2]>; }
The component name is HomePage and it returns a div element with text.
Fill all three blanks to import React, define a component, and export it as default.
import [1] from 'react'; function [2]() { return <h1>Welcome to Next.js!</h1>; } export default [3];
We import React, define the component WelcomePage, and export it as default. (Note: React import is optional in Next.js 13+.)