Created
April 6, 2022 08:45
-
-
Save shaharyar123/1a73d91ca4e34e5d13d52a306fe2dfc6 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 MyPage = (props) => { | |
return ( | |
<div> | |
<div id="title">My Test Page</div> | |
{data.map((component, i) => { | |
<> | |
<h3> : {component.heading} </h3> | |
<div key={i}> | |
<MyComponent component={component} /> | |
</div> | |
</>; | |
})} | |
</div> | |
); | |
}; | |
export const getServerSideProps = async () => { | |
const data = getData(); //call some api or get from static file, etc | |
return { props: { data } }; | |
}; | |
export default MyPage; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment