I am at lectures 22 & 23, section 7: Forms of “Master React”.
I have followed Mosh’s code review at lecture 23 but I am still having some problems with my application:
Problem 1: After implementing Mosh’s code, when I click the ‘New Movie’ button I get a ‘Not found’ component instead of getting the empty movie form. My efforts at debugging have led me to this method in the MovieForm component:
I don’t remember implementing something where we could give a movie an id of “new” anywhere in the project and this was not covered in Mosh’s code review, and then I think where it says “if (!movie)” replace the movie with the not found component is where the problem is.
If I comment out this method in the component then when I click the “New Movie” button I get my MovieForm component as intended.
EDIT: Did I need to change something on my Route for ‘movies/new’?
Problem 2: When clicking on a movie title, it does take me to the MovieForm component with all the details are filled in except the genre. I have investigated but I am not really sure where to start with this one.
Can anyone help? I don’t really want to proceed with the rest until this stuff is fixed.
I went throught the step. Could you please provide the full code of this page. I think you are working on the movieForm. This form should be extends Form.
I was able to figure it out, I realised I added an extra route for my new movie form which was not necessary so when I commented it out, I was able to get the movie form from pressing the new movie button:
That route worked fine in my initial implementation but when I added the logic in the ComponentDidMount with Mosh then the conditional statement broke my route. So seems like that was the problem. I can add a new movie now. Thanks for your help
It’s awesome you found the issues and solved it. I am on the track and stuck at of updating and add new a movie which required connect to MongoDB. It’s seem like libraries were not matching and thought our errors. I am waiting for support.
Hi Ben79,
True, in all the previous lectures we didnt implement smth similar, and Im a little bit frustrated with the task as well. In the solution Mosh could at least explain everything in more details.
And that phrase of him just killed me : if you can not make it you will not be able to work on the real React project Very inspiring
Hi guys in the same vein as this topic, I am having trouble with the Genre drop down. I have gone over it and over it, and can not see my issue anyone have any insight