Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Scott Saniuk](https://secure.gravatar.com/avatar/1819e30c00662b42b094f5bb3a04e173?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Scott Saniuk
87 PointsTrouble displaying image data - React giphy search tutorial
I am running into an issue with the giphy search tutorial. I am getting back gif data from the server, and can see the "images" field in the returned gifs. However when I try to display a url like "props.data.images.fixed_width.url", I am getting an error "cannot read property "fixed_width" of undefined. I've tried reading any of the subproperties of images at multiple points in the app, and I always get that error. It is very strange because I can read any of the base level elements, and if I spit out the images property, it shows all the additional subproperties I am looking for. I'm stumped and can't seem to get past this, and even more confused because when I'm not troubleshooting I have the code in there exactly as it is working in the tutorial...
jobbol
Full Stack JavaScript Techdegree Student 17,238 Pointsjobbol
Full Stack JavaScript Techdegree Student 17,238 PointsSo the console log is telling you "props.data.images" has nothing in it.
Firing early
I'm assuming you're working with xhr. Are your images completely loaded before you begin looking at their properties? Console log when the load finishes, and again at the point of access. Access should occur after.
Data type
Is images of type object and not an array? Did you mean something like
images[i].fixed_width.url
?