Get data using experimental version nextjs13 #83
Answered
by
maarten2424
softwarepark
asked this question in
Help
-
|
Hi, I try get data (list of products) using experimental appDir in Nextjs. Before I using getStaticProps with swell sdk. This solution works. But now in experimental version Nextjs we don’t have getStaticProps |
Beta Was this translation helpful? Give feedback.
Answered by
maarten2424
Jan 12, 2023
Replies: 1 comment
-
|
Hey @softwarepark Hopefully this answers your question! |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
logeshswell
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey @softwarepark
If you are using the experimental
appdirectory in Next.js, all of the components inside the app folder are server components by default. This means you can create your component including your data async like so:Hopefully this answers your question!