-
Hello All, I have recently started working on Next.js and I have created a React Component and Using that on the Next page. And Component is working as expected that it's fetching the data from API and shows in the Page But it's only rendering on client-side, I wanted to see the actual content when I do the View Source of the Page, how I can achieve this to do in Server-side rendering as I can't use in the components getServerSideProps* which should be used in pages only, Below is my code Component
And I am using this component in my NextPage as regular
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
If anyone is stuck with this problem, finally I resolved it I have used getStaticProps as I wanted to get the data from Build time, so I followed getStaticProps else you guys can use getServerSideProps
Then I use
|
Beta Was this translation helpful? Give feedback.
If anyone is stuck with this problem, finally I resolved it
I have used getStaticProps as I wanted to get the data from Build time, so I followed getStaticProps else you guys can use getServerSideProps
Then I use