You defined an inline record inside of a variant, so you can’t create a variable of this inline type, you have to pattern match on its fields to to access them, like this:
@jsx.component
let make = (~data: data) => {
switch data->Plex.getFirstMovieFromMediaContainer {
| Some(Movie({title, thumb, ratingKey})) => {
Console.log3(title, thumb, ratingKey) // <-- works now
<Movie title />
}
| _ => <div> {Preact.string("Movie not found.")} </div>
}
}