Closed sarahuyghe closed 5 years ago
Bij het aanroepen van addMovieWatchList geef je 1 object mee met een aantal properties in https://github.com/devinehowest/wad-opdracht-2019-sarahuyghe/blob/618d40a552638e19cb7b9145fef0114362b0fd38/movie-library/client/src/components/Movie.jsx#L17-L21
De constructor verwacht 3 (optioneel 4) argumenten, maar je plaatst dus een volledig object in de title property https://github.com/devinehowest/wad-opdracht-2019-sarahuyghe/blob/618d40a552638e19cb7b9145fef0114362b0fd38/movie-library/client/src/models/MovieWatchList.js#L5
Hoe het dan verder verloopt heb ik niet bekeken, maar dat verklaart wel de foutmelding: de {movie.title} die je wil weergeven bevat een object ipv enkel een String, de titel
Je doet wel een aantal vreemde dingen hoor, wil je dit nog eens goed bekijken aub?
Een formulier zonder inputveld, waarom? https://github.com/devinehowest/wad-opdracht-2019-sarahuyghe/blob/618d40a552638e19cb7b9145fef0114362b0fd38/movie-library/client/src/components/Movie.jsx#L33-L38
Waarom die ref? Je kan toch aan de movie via de props? https://github.com/devinehowest/wad-opdracht-2019-sarahuyghe/blob/618d40a552638e19cb7b9145fef0114362b0fd38/movie-library/client/src/components/Movie.jsx#L19
Waarom die ref? Je kan toch aan de poster via de movie uit de props? https://github.com/devinehowest/wad-opdracht-2019-sarahuyghe/blob/618d40a552638e19cb7b9145fef0114362b0fd38/movie-library/client/src/components/Movie.jsx#L20
Dit is heel vreemd, een link naar een API met jouw key in de url? Heb je geen link naar een publieke pagina? Je wil toch zo iets zien? https://www.themoviedb.org/movie/299534-avengers-endgame https://github.com/devinehowest/wad-opdracht-2019-sarahuyghe/blob/618d40a552638e19cb7b9145fef0114362b0fd38/movie-library/client/src/components/Movie.jsx#L40-L42
2 verschillende soorten data => 2 stores https://github.com/devinehowest/wad-opdracht-2019-sarahuyghe/blob/618d40a552638e19cb7b9145fef0114362b0fd38/movie-library/client/src/store/index.js#L15-L16 https://github.com/devinehowest/wad-opdracht-2019-sarahuyghe/blob/618d40a552638e19cb7b9145fef0114362b0fd38/movie-library/client/src/store/index.js#L19-L20
branch: problem permalink: https://github.com/devinehowest/wad-opdracht-2019-sarahuyghe/blob/618d40a552638e19cb7b9145fef0114362b0fd38/movie-library/client/src/components/Movie.jsx#L35
Probleem: Wanneer ik probeer om een nieuwe film toe te voegen aan mijn lijst, krijg ik de foutmelding
Uncaught Invariant Violation: Objects are not valid as a React child (found: object with keys {title, movieId, poster}). If you meant to render a collection of children, use an array instead.
en ook dat hij geen enkele http://localhost:3000/... (bv: http://localhost:3000/Movie.jsx) kan terugvinden
Hij voegt wel de correcte data toe aan mijn database maar het loopt dus mis bij het opnieuw inladen.