EraCode practice

Next.js practice challenges

Public Next.js challenges shared by the EraCode community. These pages are teasers — skill maintenance starts when you attempt the full problem inside EraCode.

Inject a request-scoped value with Next.js Middleware + header()

intermediateMulti-PartNext.js

Practice lightweight dependency injection in Next.js by pushing a value into the request context (via a header) and consuming it in a Server Component.

Iterate route params into static pages (generateStaticParams)

intermediateMulti-PartNext.js

Practice iterating over a dataset to prebuild dynamic routes in the Next.js App Router using generateStaticParams.

Mock Next.js navigation in a client-component test

intermediateMulti-PartNext.js

Quick daily practice on testing Next.js client components: mock the App Router navigation hook so you can assert route changes without a real browser.

A11y Quick Win: Announce Route Changes in the App Router

intermediateMulti-PartNext.js

Practice a small but meaningful accessibility improvement in a Next.js App Router layout: add an aria-live announcement so screen reader users get feedback when navigation completes.

Preserve filters while navigating (URLSearchParams + router)

intermediateMulti-PartNext.js

Quick practice on Next.js navigation: keep existing query params when routing to a new path.

Path Aliases: Clean Imports in a Next.js App

intermediateMulti-PartNext.js

Practice a focused Next.js modules/imports skill: using a TypeScript path alias to avoid brittle relative imports.

Canonicalize a slug for a Next.js dynamic route

intermediateMulti-PartNext.js

Quick practice on string normalization for SEO-friendly routing in Next.js: understand when to redirect and implement a tiny slug canonicalizer.

Other technologies