Friday, 18 March 2022

How to make a Wrapper or Layout to avoid repetition on several NextJS pages

I've been working with Nextjs for a while and I'm trying to avoid repetitive tasks. For a dynamic site, the menu and footer which are repeated on the whole page cause me a serious problem. To avoid this, I thought of making a Wrapper that I repeat on all the pages and pass the data in props.

But what I'm doing is making a wrapper that loads the data and won't be repeated on all the pages.

Look at the picture to get an idea of what I say

https://www.figma.com/file/u4okWHg3CpbgLPpZEiYJxI/Untitled?node-id=0%3A1

enter image description here



from How to make a Wrapper or Layout to avoid repetition on several NextJS pages

No comments:

Post a Comment