-
Book Overview & Buying
-
Table Of Contents
React Application Architecture for Production..
By :
Currently, our application pages are working fine, but there is no navigation present, so there is no clear way to navigate from the home page to the dashboard. We already have the navigation component available at src/components/navigation.tsx. While we could add it to every page separately, there is a better to add it to layouts because with layouts to avoid unnecessary rerenders when navigating between the pages.
Layouts are components that wrap the content of pages and provide a common structure around them. A common use case for layouts is the navigation. We want to keep the navigation visible on every page to provide a consistent user experience. In our application, there are 2 level of navigation:
To achieve this, we will create the layout components that will wrap the routes of the application.
We will first create the...