Complete the code to create a nested route folder named 'blog' inside the 'app' directory.
app/[1]/page.jsThe folder named blog inside the app directory creates a nested route at /blog.
Complete the code to define a nested page component inside the 'blog' folder.
export default function [1]() { return <h1>Blog Home</h1>; }
In Next.js App Router, the default exported component in page.js is usually named Page.
Fix the error in the nested route file path to correctly represent a dynamic route for blog posts by slug.
app/blog/[1]/page.jsDynamic route folders in Next.js use square brackets, like [slug], to capture dynamic segments.
Fill both blanks to create a nested dynamic route folder and a page component that receives the slug parameter.
app/blog/[1]/page.js export default function Page({ params }) { return <h1>Post: {params.[2]</h1>; }
The folder [slug] defines the dynamic segment, and params.slug accesses its value inside the component.
Fill all three blanks to create a nested route with a subfolder 'comments' inside a dynamic post route, and display the comment id from params.
app/blog/[1]/comments/[2]/page.js export default function Page({ params }) { return <h1>Comment ID: {params.[3]</h1>; }
The dynamic post folder is [slug], inside it the dynamic comments folder is [commentId], and the component accesses params.commentId.