Created
April 23, 2021 02:16
-
-
Save Hurly77/eeccea9253b55799ba463124b7280776 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const HomePage = (props) => { | |
return ( | |
<div> | |
<li></li> | |
<li></li> | |
<li></li> | |
</div> | |
) | |
} | |
// we always want to return an object with a key props | |
// The cool thing about this function is that instead of rendering the component function first we'll execute the getStaticProps function get our data and then render that data into the HomPage component. | |
export const getStaticProps = async() => { | |
return {props: { | |
products: [id: 'p1', title: 'Product 1'] | |
}} | |
} | |
export default HomePage |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment