Open coderschoolreview opened 6 years ago
@gioan85 Note: I was not able to create a branch correction
so I forked your repository and opened a pull-request there :) Can see it here: https://github.com/gioan85/homework/pulls
tks for ur comment, it so helpful
Hello! Thank you for submitting the first homework for CoderSchool React Class🎉 ! The main focus of this assignment was to introduce you to working with an API, rendering items in a collection, and dealing with
state
andprops
.Great✨
App.js
incomponentDidMount
. The official Facebook React Native example does this as well. (React and React Native have the same convention here.)Not so great yet 🚩
content
variable was overriden. In thecorrection
branch I showed a possible fixShowHide_Overview
was not a good name.showHideOverview
is better, ortoggleOverview
like I suggest in the correction.path_2()
function topath()
and removed the first one as it was not used. It confused me at first.MovieCard
component takes amovies
property whereas there is only 1 movie. It if confusing and it should be namedmovie
. Defining thepropTypes
of your component would have helped, I showed you how to do that in thecorrection
!ShowHide_Overview.bind(this)
should be done in theconstructor()
and not inside theonClick
event. That is because.bind(this)
creates a new function, which is a costly operation you only want to do once in the constructor, not everytime the users clicks.