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

JavaScript Introduction to React Native Implementing 3rd Party API Integration Asynchronous Actions

Could you please add updated action.js and marvelApi.js files. Because You did not show marvelApi.js and action.js?

Please add downloads file !!!

2 Answers

Micha Krapp
Micha Krapp
2,228 Points

I think there is a video missing between this and the first, because there is no video where the API gets implemented in MarvelApi.js?? For me this video („Asynchronous Actions”) is the second video. And in the first we only see the marvel website but not any api key or the file named above.

Seth Kroger
Seth Kroger
56,414 Points

Going off memory from a couple months ago, the MarvelApi.js file is given to you in the stage 4 files already implemented except for the API keys. You need to register on the API site to get your own keys. It's not gone over in any detail here but it is a fairly standard use of the Fetch API to grab some JSON data. The instructor probably assumed people would already be familiar with it, and focused to how to use the results in React Native/Redux instead. There are other workshops here that cover using the JavaScript Fetch API:

https://teamtreehouse.com/library/working-with-the-fetch-api

https://teamtreehouse.com/library/data-fetching-in-react

Seth Kroger
Seth Kroger
56,414 Points

There is a download attached to the previous video. It will have the added files.

It is not updated also it does not work. Please check previous messages about this course.

Thnx.

Seth Kroger
Seth Kroger
56,414 Points

No, those files are updated and correct (relatively speaking for this course). After supplying the API keys and editing actions.js as shown in the two videos (as well as lowercasing the paths and fixing index.android yet again) the app builds and runs successfully.