Skip to content
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

Earth/Taylor #47

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Earth/Taylor #47

wants to merge 6 commits into from

Conversation

TaylorMililani
Copy link

Assignment Submission: Exquisite React

Congratulations! You're submitting your assignment. Please reflect on the assignment with these questions.

Reflection

Prompt Response
Define in your own words: What does "state" in React mean? How do we use it? State is an object that can change over time.
Describe the relationships between the components on a high-level: which components were siblings? Which components were nested within each other? Game was nested in App, and PlayerSubmissionForm, RecentSubmission, and FinalPoem (siblings) were nested in Game.
How did this project differ from in-class examples? We didn't have to update any previously entered data, also in exquisite, we had to hide and and show different elements at different times based on if the final poem was submitted.
How was this project similar to in-class examples? The form and functions to create new lines was similar to the studentlist in the in-class example.

Copy link

@CheezItMan CheezItMan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work Taylor, you have a fully functional Exquisite corpse game and you got all the tests to pass. Well done.

I did leave some notes regarding your warning messages.

@@ -6,7 +6,7 @@ const RecentSubmission = (props) => {
return (

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just note there's a prop submission that you're using here which is marked as required in propTypes, but it's not being used. Either remove it, or use the prop to get rid of the warning.

setPoemFields(emptyValues)
}

const inputValues = props.fields.map((field) => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each item here needs a key attribute. You can wrap the strings in a span like this:

else {
  return <span key={field}> {field } </span>
}

Making sure each element in the array has a key will get rid of the warning you're seeing.

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