Skip to content

Conversation

@phoebedg
Copy link

No description provided.


this.state = {
movies: [],
moreInfo: []
Copy link
Contributor

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 : (
Copy link
Contributor

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 }) {
Copy link
Contributor

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);
Copy link
Contributor

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 = {
Copy link
Contributor

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 {
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants