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

feat: Enhancing Application Performance with Next.js Server Components #1906

Closed
5 tasks done
s2sharpit opened this issue Jul 30, 2023 · 5 comments · Fixed by #1916
Closed
5 tasks done

feat: Enhancing Application Performance with Next.js Server Components #1906

s2sharpit opened this issue Jul 30, 2023 · 5 comments · Fixed by #1916
Assignees
Labels
💻 aspect: code Concerns the software code in the repository ⭐ goal: addition Addition of new feature ✨ goal: improvement Improvement to an existing feature gssoc23 only for Girlscript summer of code level3 high level fix for GSSoC 🟧 priority: high Stalls work on the project or its dependents 🏁 status: ready for dev Ready for work

Comments

@s2sharpit
Copy link
Contributor

s2sharpit commented Jul 30, 2023

What feature?

Greetings,

I hope this message finds you well. I would like to raise an important point regarding our Next.js application's performance optimization.

Current Situation:

Currently, the entire layout of our Next.js application is treated as a Client Component. This means that all the interactivity logic, including the search functionality (e.g., <SearchBar /> in Projects page), is bundled and sent to the client-side.

Proposed Optimization:

To improve our application's performance, we should follow a more efficient approach. Instead of making the whole layout a Client Component, we can enhance it by moving the interactive logic, like the search functionality, into a dedicated Client Component (e.g., <SearchBar />). Meanwhile, we will keep the main layout as a Server Component.

Benefits:

By adopting this approach, we gain the following advantages:

  • Faster Initial Load: The initial HTML rendering is done on the server, leading to faster page loads for users.

  • Reduced Client-Side Payload: By moving the interactive logic to a separate Client Component, we only load the necessary JavaScript for that specific functionality on the client-side. This results in a smaller and more optimized JavaScript bundle.

Action Plan:

Let's work together to refactor our Next.js application accordingly. By making use of Server Components for the main layout and Client Components for interactive parts like the search functionality, we can significantly enhance our application's performance without sacrificing functionality.

Thank you for considering this optimization. If you have any questions or need further clarification, please feel free to ask.

Best regards,
Tushar

Add screenshots

.

Record

@s2sharpit s2sharpit added ⭐ goal: addition Addition of new feature 🚦status: awaiting triage Has not been triaged & therefore, not ready for work labels Jul 30, 2023
@github-actions
Copy link

To reduce notifications, issues are locked. Your issue will be unlock when we will add label as 🏁 status: ready for dev. Check out the contributing guide for more information. Also, if you're in GSSoC'23 please check the discussion

@github-actions github-actions bot locked and limited conversation to collaborators Jul 30, 2023
Repository owner unlocked this conversation Jul 31, 2023
@priyankarpal
Copy link
Owner

We're already working on backend part and almost finished. We just need a bit more time to test and make sure everything works well. After that all data will come from db & there will be a form to add projects

@priyankarpal priyankarpal added 💬 talk: discussion Open for discussions and feedback and removed 🚦status: awaiting triage Has not been triaged & therefore, not ready for work labels Jul 31, 2023
@s2sharpit
Copy link
Contributor Author

We're already working on backend part and almost finished. We just need a bit more time to test and make sure everything works well. After that all data will come from db & there will be a form to add projects

Hi @priyankarpal,

Thank you for the update! It's good to know that the backend work is nearly complete. But in this issue, I wanted to discuss an optimization proposal for our Next.js App Router, which won't affect the ongoing backend development or the project form implementation.

The main feature of our Next.js App Router that we'll focus on is utilizing React Server Components. By strategically using server components and designating only interactive parts as client components, we can enhance our website's performance. This approach will improve SEO, achieve faster page loads, and reduce the JavaScript bundle size.

I'll handle the conversion of pages to server components and ensure client components are used efficiently for interactivity.

For more details about React Server Components and their implementation, you can refer to the official documentation: https://nextjs.org/docs/getting-started/react-essentials

Please feel free to ask any questions or seek clarification.

Thank you for considering this optimization proposal. Let's work together to enhance our Next.js App Router and provide an improved user experience.

Best regards,
Tushar

@priyankarpal
Copy link
Owner

ok ok but make sure to work on previous issue first

@s2sharpit
Copy link
Contributor Author

ok ok but make sure to work on previous issue first

Hey @priyankarpal, regarding issue #1875, I'd like to propose using the Next.js Metadata API for better SEO. However, before we proceed with its implementation, we need to address this issue first. Could you please assign it to me? Once it's done, I'll take care of the SEO improvement. Thanks!

@priyankarpal priyankarpal added ✨ goal: improvement Improvement to an existing feature 🟧 priority: high Stalls work on the project or its dependents 🏁 status: ready for dev Ready for work gssoc23 only for Girlscript summer of code level3 high level fix for GSSoC 💻 aspect: code Concerns the software code in the repository and removed 💬 talk: discussion Open for discussions and feedback labels Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💻 aspect: code Concerns the software code in the repository ⭐ goal: addition Addition of new feature ✨ goal: improvement Improvement to an existing feature gssoc23 only for Girlscript summer of code level3 high level fix for GSSoC 🟧 priority: high Stalls work on the project or its dependents 🏁 status: ready for dev Ready for work
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants