Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Migrate to Next.js App Directory #3687

Closed
2 tasks done
thisisrick25 opened this issue Feb 15, 2025 · 2 comments
Closed
2 tasks done

[FEATURE] Migrate to Next.js App Directory #3687

thisisrick25 opened this issue Feb 15, 2025 · 2 comments

Comments

@thisisrick25
Copy link

Why do we need this improvement?

The current implementation using the Pages Directory will become increasingly difficult to maintain and scale. Challenges with complex routing, data fetching, and overall code organization will become more apparent. As the application grows, these issues will only intensify, hindering development velocity and potentially impacting performance. The App Directory addresses these issues by offering a more structured, efficient, and scalable architecture.

How will this change help?

  • Improved Performance: Server Components allow for data fetching on the server, reducing the amount of JavaScript sent to the client, resulting in faster initial load times and improved Core Web Vitals.
  • Enhanced SEO: Server-side rendering improves SEO by providing search engines with fully rendered HTML content.
  • Simplified Routing: The file-system based routing in the App Directory is more intuitive and easier to manage, especially as the application grows. Nested layouts and improved support for dynamic routes simplify route definitions.
  • Better Code Organization: The App Directory promotes better component co-location and organization, leading to a more maintainable and scalable codebase.
  • Data Fetching: Data fetching, caching, and mutations are simplified with features like async/await directly within layouts and components.
  • Future-Proofing: Align with the recommended Next.js architecture for future feature adoption and performance optimizations.

Screenshots

No response

How could it be implemented/designed?

The migration can be implemented in the following phases:

  1. Planning: Analyze existing routes and components. Prioritize migration based on complexity. Define a clear migration plan with milestones and timelines.
  2. Incremental Migration: Migrate in phases, starting with less complex sections. Convert pages to layouts and components, leveraging Server Components strategically.
  3. Testing: Implement comprehensive testing to ensure functional parity and performance improvements. Focus on unit, integration, and end-to-end tests.

Potential Challenges:

  • Refactoring Effort: Significant code refactoring will be required.

🚧 Breaking changes

Yes

👀 Have you checked for similar open issues?

  • I checked and didn't find a similar issue

🏢 Have you read the Contributing Guidelines?

Are you willing to work on this issue?

Yes I am willing to submit a PR!

Copy link

Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

@anshgoyalevil
Copy link
Member

That would actually require a lot and lot of breaking changes. I wouldn't recommend that change until extremely necessary.

@anshgoyalevil anshgoyalevil closed this as not planned Won't fix, can't repro, duplicate, stale Feb 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants