4. Updating the Track model
3m

🎯 Your goal for this step:

Update the models/TrackModel model with a property that identifies its primary artist

Updating model tasks

Solution: Updating the Track model

models.ts
// Represents a track object returned by the REST API
export type TrackModel = {
id: string;
name: string;
duration_ms: number;
explicit: boolean;
uri: string;
artists: { id: string }[];
};
Previous

Share your questions and comments about this lesson

Your feedback helps us improve! If you're stuck or confused, let us know and we'll help you out. All comments are public and must follow the Apollo Code of Conduct. Note that comments that have been resolved or addressed may be removed.

You'll need a GitHub account to post below. Don't have one? Post in our Odyssey forum instead.