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

Water - Beatrice #31

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

Water - Beatrice #31

wants to merge 6 commits into from

Conversation

Beatress
Copy link

@Beatress Beatress commented Jan 8, 2021

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 a way for components to have a persistent "memory" that persists between re-rendering. We use it to store any information the app needs on an ongoing basis.
Describe the relationships between the components on a high-level: which components were siblings? Which components were nested within each other? FinalPoem, RecentSubmission, and PlayerSubmitForm were all siblings nested under the Game component.
How did this project differ from in-class examples? It was a dynamic application with distinct phases (gameplay and then final poem) using the CSS display attribute. It also used a template variable (FIELDS) to construct itself, meaning that changes to the sentence structure could be rather easy.
How was this project similar to in-class examples? It followed the general model of using props to pass info down and callback functions to modify state higher up as with Student

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 Beatrice, you have a fully functional Exquisite corpse game and you got all the tests to pass. Well done.

You are failing a few tests, the reasons of which is just because you're hiding content with CSS and the tests are still seeing the HTML elements in the resulting page.

@@ -25,12 +64,15 @@ const Game = () => {
{ exampleFormat }
</p>

<RecentSubmission />
<div className={showRecentSubmission() ? 'visible' : 'hidden'}>
<RecentSubmission submission={poem[poem.length-1]}/>

Choose a reason for hiding this comment

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

Just note that if poem is empty this will send undefined to the prop submission and that's why you're getting a warning.

<div className="FinalPoem">
<section className="FinalPoem__poem">
<div className='FinalPoem'>
<section className={`FinalPoem__poem ${props.isSubmitted ? 'visible' : 'hidden'}`}>

Choose a reason for hiding this comment

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

You're hiding the content based on CSS while the test just assumes it's not rendered at all, which is why the test fails.

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