Iamogeee / flixster-starter

0 stars 0 forks source link

Codepath Week 2 feedback - Flixter #1

Open jose-esquivel opened 2 months ago

jose-esquivel commented 2 months ago

Thread for providing feedback for Ogenna's second week project.

Commits: https://github.com/Iamogeee/flixster-starter/commits/main/

sinap-fb commented 2 months ago

This was quite a complex app to build - amazing work!

Code review

Minor nitpicks

Food for thought

mylesdomingo commented 2 months ago

Great work! There's a lot of moving parts but overrall the commits were pretty clean and easy to follow. A couple of points:

UX:

Screenshot 2024-06-17 at 1 52 10 PM

Code Review

// Forces next line of code not to run util data has been fetched completely.
try {
    const data = await fetch(videosUrl);
} catch (e) {
    console.error("Error fetching movie trailer:", error)
}
const videos = data.json();
const trailer =  video.results.find(
    (video) => video.site === "YouTube" && video.type === "Trailer")
);
const trailerUrl = `https://www.youtube.com/embed/${trailer.key}`;

Note how using both promises and async/await are redundant because they achieve the same goal: handling asynchronous data.

This combines 2 things that are generally more complex concepts in JS, but are essential as a web developer interacting with APIs: try/catch blocks and promises + async/await.

I would take a look at these concepts in MDN for more info: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch

jose-esquivel commented 2 months ago

Echoing what the others said, finishing this app and being able to complete so many stretch features is an amazing feat, You should be very proud about it!

Highlights:

To improve:

Overall I'm very happy with the progress you've shown this, excited for the projects to come!