bluetomato
bluetomato
Explore posts from servers
TTCTheo's Typesafe Cult
Created by bluetomato on 7/8/2024 in #questions
Noob can't get getStaticProps() to work – props in my Page are always undefined
Not a noob to programming in the slightest, but extremely noob to React/ NextJS. I wanted to try building my next site on this stack and while I'm enjoying it so far, I immediately hit the snag from the title. All I'm trying to do is get some props and pass it to my Page. I feel like I'm following the examples to a T, but the props are always undefined, in both dev and after a build. If anyone can tell me how I'm being a dumbass here, I'd appreciate it massively ❤️ Slightly trimmed gist of my gallery.tsx: https://gist.github.com/SenshiSentou/9173319ec8da82af805a83b470019e5e Thanks EDIT: Giving the props object a key and matching this name on the Gallery function's param solved it
4 replies