How to fetch data server side in component (NextJs 13)
Unanswered
Wuchang bream posted this in #help-forum
Wuchang breamOP
I'm new to nextjs, i'm migrating from nuxtjs to nexjs. In nuxtjs, there is a function called asyncData() allow me to call api from server side. How can i do the same thing in nextjs, i tried getserversideprops() but it only works on page. i tried server component but then i want to treat my data like an state then the component be come client side.
2 Replies
@joulev https://discord.com/channels/752553802359505017/752647196419031042/1120637395423989780
Wuchang breamOP
thankyou sir