0
0
NextJSframework~10 mins

Create Next App setup in NextJS - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a new Next.js app using the command line.

NextJS
npx create-next-app@latest [1]
Drag options to blanks, or click blank then click option'
Acreate-next
Bnext-app
Capp-next
Dmy-next-app
Attempts:
3 left
💡 Hint
Common Mistakes
Leaving the app name blank
Using invalid characters in the app name
Typing the command incorrectly
2fill in blank
medium

Complete the command to start the Next.js development server.

NextJS
cd my-next-app && npm run [1]
Drag options to blanks, or click blank then click option'
Abuild
Btest
Cdev
Dstart
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'start' instead of 'dev' for development
Running the command outside the project folder
3fill in blank
hard

Fix the error in the Next.js app entry point import statement.

NextJS
import { [1] } from 'next/app';
Drag options to blanks, or click blank then click option'
Aapp
BAppProps
CAppComponent
DMyApp
Attempts:
3 left
💡 Hint
Common Mistakes
Using default import syntax (no curly braces)
Using incorrect names like 'App' or lowercase
4fill in blank
hard

Fill both blanks to create a basic Next.js page component.

NextJS
export default function [1]() {
  return <[2]>Hello Next.js!</[2]>;
}
Drag options to blanks, or click blank then click option'
AHomePage
Bdiv
Cspan
DApp
Attempts:
3 left
💡 Hint
Common Mistakes
Using lowercase function names
Using invalid HTML tags
5fill in blank
hard

Fill all three blanks to import React, define a component, and export it as default.

NextJS
import [1] from 'react';

function [2]() {
  return <h1>Welcome to Next.js!</h1>;
}

export default [3];
Drag options to blanks, or click blank then click option'
AReact
BWelcomePage
DReactDOM
Attempts:
3 left
💡 Hint
Common Mistakes
Not importing React
Mismatching function name and export
Importing ReactDOM instead of React