Skip to main content

Posts

Showing posts with the label next

pages in next.js

Introduction Next.js contains a feature called as Pages that helps us to maintain a clear isolation of the page level components and their layouts. This helps us in having page and routing implementations separate from the components, helping in isolation of the application layout / presentation with that of the functional components This segregation helps us in having slim components and isolate the layout / page level actions. Also, since there are pages, the components that comprise a page atleast at the higher level can be easily found out in this system. Problem Statement We have been using react.js for building SPA (Single Page Applications) for a while and we experienced that some features like pages and routing are not very comfortable with react.js Compared with other frameworks, react does not have option to fully perform the routing and having pages. There are times where we have to duplicate the layouts to all components that act like pages in the react application.