This guide walks you through the steps to create a new page in the template. By leveraging Next.js file-system routing and the extended routing configuration, you can easily add new pages with tailored settings.
src/app/(layout)
directory. If it doesn't require layouts, use the src/app/(non-layout) directory instead. src/app/product/page.tsx
src/app/product/[id]/page.tsx
Define the React component for your page. Example:
const Page = () => { return (
); }; export default Page;Welcome to the New Page
This is a custom page.
Instead of applying 'use client' directly to the page file, it is recommended to create a separate client component and import it into the page. This approach allows the page itself to remain server-rendered, optimizing server-side rendering (SSR) and letting only the client-side logic be handled in the client component. For example:
// src/app/(layout)/new-page/page.tsx import ClientComponent from './ClientComponent'; const NewPage = () => { return (
); }; export default NewPage;New Page
<ClientComponent />
// src/app/(layout)/new-page/_components/ClientComponent.tsx 'use client'; const ClientComponent = () => { return
This component runs on the client.
; }; export default ClientComponent;
Be the first to know about new updates and exclusive discounts. No spam, just great offers!
How about
With over 7 years of experienced team, we specialize in delivering custom projects for startups, blue-chip companies, and government agencies. We have successfully completed over 250+ projects, providing tailored solutions that meet the unique needs of each client.
Hire Us© Domiex Created & Crafted by SRBThemes.