import Head from 'next/head'
      import section from "../src/components/section"
      
      
      export default function Page({data}){
        return(
            <>
            <Head>
            <title>title here</title>
            </Head>
            <Section sectionData={data} />
            </>
        )
      }
      
      export async function getStaticProps(){
      
        const data = 'make your fetch request here'
      
        return {
          props: {
            data: data
          },
        }
      }

      Javascript language logo
      your recipe card header background
      Nextjs Page with getStaticProps

      Nextjs with tailwind

      In this code, the Page function exports an async function getStaticProps(). The getStaticProps function takes in an object as its only parameter and returns that object's props property.

      Shortcut: nextjs.page.pageWithgetStaticProps

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.