An Interest In:
Web News this Week
- April 23, 2024
- April 22, 2024
- April 21, 2024
- April 20, 2024
- April 19, 2024
- April 18, 2024
- April 17, 2024
March 18, 2022 10:07 am GMT
Original Link: https://dev.to/codewithkenn/nextjs-getserversideprops-not-working-into-components-4gf7
NEXTJS: getServerSideProps not working into components
Hey, Guys!
This is Kenn here, from CodeWithKenn.
From today, you'll be seeing many React/Next/Gatsby related bugs solved, just decided to add a kind of bugs Documentation style.
Because, I ended up searching for the same bugs after months (I don't remember what the solutions were). So, I decided to start documenting it here on Dev.to
This helps me to save some time and be more productive.
So, Feel free to follow if you're interested! Peace ;)
Bug Info
NEXTJS: getServerSideProps not working into components
Bug Solution
You cannot use getServerSideProps
in non-page components.
getServerSideProps
can only be exported from a page. You cant export it from non-page files.
Let's Connect
Want to start blogging? Join NOW!
Original Link: https://dev.to/codewithkenn/nextjs-getserversideprops-not-working-into-components-4gf7
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To