-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added css phoebedg #2
base: master
Are you sure you want to change the base?
Conversation
|
||
this.state = { | ||
movies: [], | ||
moreInfo: [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might make sense to initialise moreInfo
to empty string if it will store a string
movies={this.state.movies} | ||
getMoreInfo={this.getMoreInfo} | ||
/> | ||
{this.state.moreInfo === "" ? null : ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this might not work since moreInfo
is initialised to empty array. You could also simplify it to take advantage of empty string being falsy by writing it as !this.state.moreInfo ? null : <Info moreInfo={this.state.moreInfo} />
@@ -0,0 +1,20 @@ | |||
import React from "react"; | |||
|
|||
function Info({ moreInfo }) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
import React from "react"; | ||
|
||
function Info({ moreInfo }) { | ||
console.log("moreInfo:", moreInfo); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor point: it's good practice to avoid committing console.logs
@@ -0,0 +1,76 @@ | |||
import React from "react"; | |||
|
|||
const config = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
box-shadow: 5px 1px 1px red; | ||
} | ||
|
||
.movieheading { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kebab case works well for multi-word CSS classes. For example .card-text
No description provided.