---
title: "Discussion on \"#6 Adding common code for all pages in Next.js - Delightful React\" | Hashnode"
description: "Discussion on \"#6 Adding common code for all pages in Next.js - Delightful React\". We accomplished a lot in the last few chapters. We also managed to style our app using a stylesheet. We will be creating more components and even pages in our app. So it is good time to structure our app and give it a central layout. \n\nGenerally ther..."
url: "https://hashnode.com/posts/6-adding-common-code-for-all-pages-in-nextjs-delightful-react/6007249d094f2b30301ddf7f"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [#6 Adding common code for all pages in Next.js - Delightful React](https://codewithbhargav.hashnode.dev/6-adding-common-code-for-all-pages-in-nextjs-delightful-react?utm_source=hashnode&utm_medium=feed)

We accomplished a lot in the last few chapters. We also managed to style our app using a stylesheet. We will be creating more components and even pages in our app. So it is good time to structure our app and give it a central layout. Generally ther...

Jan 19, 2021 · 6 min read · codewithbhargav.hashnode.dev  
Updated Apr 9, 2022  
Read the article

-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#nextjs](https://hashnode.com/tag/nextjs)
-   [#2articles1week](https://hashnode.com/tag/2articles1week)
-   [#beginners](https://hashnode.com/tag/beginners)

## Written by

[Bhargav Ponnapalli](https://hashnode.com/@codewithbhargav)

@codewithbhargav · India

  
[View profile](https://hashnode.com/@codewithbhargav)

Hashnoder | Frontend Developer | Youtuber

I Code, Teach and Build Javascript stuff.

## Responses 1

Markdown supported · ⌘↵ to post

[Chirag Ramachandra](https://hashnode.com/@ChiragRamachandra)

[Jan 20, 2021](https://hashnode.com/posts/6-adding-common-code-for-all-pages-in-nextjs-delightful-react/6007249d094f2b30301ddf7f/comment/6007d489b2c54030097c518c)

Hi Bhargav, just wanted to add that all the seo related can come in the \_app.js file too right ? How about PWA in nextJS ?

[Bhargav Ponnapalli](https://hashnode.com/@codewithbhargav)

[Jan 20, 2021](https://hashnode.com/posts/6-adding-common-code-for-all-pages-in-nextjs-delightful-react/6007249d094f2b30301ddf7f/comment/6007d489b2c54030097c518c#reply-6007d8c8094f2b30301de765)

Some of it can come in \_app.js. But you might also have to change \_document.js which is another file but mainly aimed at SSR.

I will talking about that in chapter 19 or 20 according to the current structure of my book. :)

Cheers!

[Chirag Ramachandra](https://hashnode.com/@ChiragRamachandra)

[Jan 20, 2021](https://hashnode.com/posts/6-adding-common-code-for-all-pages-in-nextjs-delightful-react/6007249d094f2b30301ddf7f/comment/6007d489b2c54030097c518c#reply-6007fdc7b2c54030097c553f)

Thanks,[Bhargav Ponnapalli](https://hashnode.com/@imbhargav5) Could you also cover how to style the banner prompting to install as PWA ? I think there is very little literature around that as well.

[Bhargav Ponnapalli](https://hashnode.com/@codewithbhargav)

[Jan 20, 2021](https://hashnode.com/posts/6-adding-common-code-for-all-pages-in-nextjs-delightful-react/6007249d094f2b30301ddf7f/comment/6007d489b2c54030097c518c#reply-600808eb094f2b30301deb4f)

For sure . Will find a way to add it. [Chirag Ramachandra](https://hashnode.com/@ChiragRamachandra)
