Skip to content

Add blog post: next-js-app-router-in-2026-a-practical-guide.mdx#169

Open
deepu0 wants to merge 1 commit into
mainfrom
content/blog-post-2026-07-12
Open

Add blog post: next-js-app-router-in-2026-a-practical-guide.mdx#169
deepu0 wants to merge 1 commit into
mainfrom
content/blog-post-2026-07-12

Conversation

@deepu0

@deepu0 deepu0 commented Jul 12, 2026

Copy link
Copy Markdown
Owner

User description

Blog post about Next.js App Router for Frontend Junction


CodeAnt-AI Description

Publish a practical guide to using Next.js App Router in 2026

What Changed

  • Added a new blog post covering current Next.js App Router patterns, common pitfalls, and best practices
  • Included a simple code example and a real-world component example to show how the guidance applies in practice
  • Marked the post as published and ready to read on the blog

Impact

✅ Clearer Next.js App Router guidance
✅ Faster onboarding for frontend developers
✅ Easier adoption of current routing patterns

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

Summary by CodeRabbit

  • Documentation
    • Added a new blog post providing a practical guide to the Next.js App Router in 2026.
    • Covers core concepts, common pitfalls, best practices, and a real-world TypeScript and React example.
    • Includes publication metadata, tags, and a call to action for readers.

@codeant-ai

codeant-ai Bot commented Jul 12, 2026

Copy link
Copy Markdown

CodeAnt AI is reviewing your PR.

@vercel

vercel Bot commented Jul 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
frontend-junction Ready Ready Preview, Comment Jul 12, 2026 3:34am

@codeant-ai

codeant-ai Bot commented Jul 12, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@coderabbitai

coderabbitai Bot commented Jul 12, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a new published MDX blog post covering Next.js App Router principles, pitfalls, best practices, typed React examples, and a community call to action.

Changes

Next.js App Router guide

Layer / File(s) Summary
Article metadata and content
content/blog-post-2026-07-12/next-js-app-router-in-2026-a-practical-guide.mdx
Adds YAML frontmatter, structured App Router guidance, TypeScript/React examples, and a closing community discussion prompt.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description summarizes the post, but it omits required template sections like Fixes #, change type, testing, and checklist. Add the missing template sections, including issue reference, type of change, testing steps, screenshots if needed, and checklist items.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly states this PR adds a specific blog post and matches the actual change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch content/blog-post-2026-07-12

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

content/blog-post-2026-07-12/next-js-app-router-in-2026-a-practical-guide.mdx

Parsing error: Invalid left-hand side in prefix operation. (1:2)


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codeant-ai codeant-ai Bot added the size:M This PR changes 30-99 lines, ignoring generated files label Jul 12, 2026
@greptile-apps

greptile-apps Bot commented Jul 12, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds a new MDX blog post about the Next.js App Router.

  • Adds frontmatter for title, description, date, tags, published state, and image.
  • Adds guide content with TypeScript examples.
  • Places the post in a new dated content folder.

Confidence Score: 4/5

The new post can be merged only after its content path is fixed.

  • The added MDX file is outside the configured blog collection path.
  • The generated blog data will skip the file, leaving the post unpublished on the site.
  • The frontmatter and MDX body otherwise match the expected shape.

content/blog-post-2026-07-12/next-js-app-router-in-2026-a-practical-guide.mdx

Important Files Changed

Filename Overview
content/blog-post-2026-07-12/next-js-app-router-in-2026-a-practical-guide.mdx Adds a new blog post, but the file path is outside the configured blog content collection.

Reviews (1): Last reviewed commit: "Add blog post: next-js-app-router-in-202..." | Re-trigger Greptile

@@ -0,0 +1,81 @@
---

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Post Outside Content Collection

This file is added under content/blog-post-2026-07-12/, but the site content collection only loads MDX files from content/blog/**/*.mdx. The post will be skipped by the generated posts data, so it will not appear on the blog index, route generation, sitemap, or RSS feed.

@codeant-ai

codeant-ai Bot commented Jul 12, 2026

Copy link
Copy Markdown

CodeAnt AI finished reviewing your PR.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
content/blog-post-2026-07-12/next-js-app-router-in-2026-a-practical-guide.mdx (1)

24-34: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Replace the placeholder with a real App Router example.

useModernPattern is only a logging function and does not demonstrate an App Router concept such as a Server Component, route segment, data fetching, or loading/error UI. As written, it may give readers false confidence that they have seen a meaningful App Router pattern.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@content/blog-post-2026-07-12/next-js-app-router-in-2026-a-practical-guide.mdx`
around lines 24 - 34, Replace the placeholder useModernPattern example with a
concrete Next.js App Router pattern, such as a Server Component, route segment,
data-fetching function, or loading/error UI. Ensure the example demonstrates the
selected concept through meaningful framework code rather than only logging a
message, while keeping the surrounding article context intact.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@content/blog-post-2026-07-12/next-js-app-router-in-2026-a-practical-guide.mdx`:
- Around line 1-7: Move the post directory and its MDX file under content/blog/
so it matches the existing Velite blog collection pattern and is included in the
blog page, route, and RSS feed.
- Around line 53-71: Add the `'use client'` directive at the top of the example
containing the `Component` function, before the interface and component code, so
its onClick handler is valid when copied into an App Router page.

---

Nitpick comments:
In
`@content/blog-post-2026-07-12/next-js-app-router-in-2026-a-practical-guide.mdx`:
- Around line 24-34: Replace the placeholder useModernPattern example with a
concrete Next.js App Router pattern, such as a Server Component, route segment,
data-fetching function, or loading/error UI. Ensure the example demonstrates the
selected concept through meaningful framework code rather than only logging a
message, while keeping the surrounding article context intact.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 22c03422-e3ef-40a8-a0e5-b4d9c7c35221

📥 Commits

Reviewing files that changed from the base of the PR and between 978700a and 6ab6224.

📒 Files selected for processing (1)
  • content/blog-post-2026-07-12/next-js-app-router-in-2026-a-practical-guide.mdx

Comment on lines +1 to +7
---
title: 'Next.js App Router in 2026: A Practical Guide'
description: 'A comprehensive guide to next.js app router for modern frontend development in 2026.'
date: '2026-07-12'
tags: ['Next.js App Router', 'Frontend', '2026']
published: true
image: './images/post-image.png'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== Files ==\n'
git ls-files 'velite.config.ts' 'content/**' 'src/**' | sed -n '1,200p'

printf '\n== velite.config.ts outline ==\n'
ast-grep outline velite.config.ts --view expanded || true

printf '\n== Search for blog collection pattern ==\n'
rg -n --hidden --glob '!node_modules' --glob '!dist' --glob '!build' 'blog/\*\*/\*\.mdx|collection\(|contentRoot|root:' velite.config.ts content src || true

printf '\n== Content tree around the article ==\n'
find content -maxdepth 3 -type f | sed -n '1,200p'

printf '\n== Post file lines 1-30 ==\n'
cat -n content/blog-post-2026-07-12/next-js-app-router-in-2026-a-practical-guide.mdx | sed -n '1,40p'

Repository: deepu0/frontend-junction

Length of output: 7922


Move this post under content/blog/ or update the Velite pattern. velite.config.ts only collects blog/**/*.mdx, so content/blog-post-2026-07-12/next-js-app-router-in-2026-a-practical-guide.mdx is excluded and won’t show up in the blog page, route, or RSS feed.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@content/blog-post-2026-07-12/next-js-app-router-in-2026-a-practical-guide.mdx`
around lines 1 - 7, Move the post directory and its MDX file under content/blog/
so it matches the existing Velite blog collection pattern and is included in the
blog page, route, and RSS feed.

Comment on lines +53 to +71
```typescript
// Real-world application example
interface Props {
data: string[];
onUpdate: (value: string) => void;
}

function Component({ data, onUpdate }: Props) {
return (
<div>
{data.map(item => (
<button key={item} onClick={() => onUpdate(item)}>
{item}
</button>
))}
</div>
);
}
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

file='content/blog-post-2026-07-12/next-js-app-router-in-2026-a-practical-guide.mdx'

echo '--- file outline ---'
wc -l "$file"
echo
echo '--- lines 1-140 ---'
cat -n "$file" | sed -n '1,140p'

Repository: deepu0/frontend-junction

Length of output: 3514


Add 'use client' to this example.

onClick makes this a Client Component; without the directive, copying it into an App Router page.tsx will fail unless it’s moved into a client child component.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@content/blog-post-2026-07-12/next-js-app-router-in-2026-a-practical-guide.mdx`
around lines 53 - 71, Add the `'use client'` directive at the top of the example
containing the `Component` function, before the interface and component code, so
its onClick handler is valid when copied into an App Router page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant