Skip to content

Space - Lee#31

Open
theomoondev wants to merge 21 commits intoAda-C13:masterfrom
theomoondev:master
Open

Space - Lee#31
theomoondev wants to merge 21 commits intoAda-C13:masterfrom
theomoondev:master

Conversation

@theomoondev
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 a Javascript object that allows React apps to dynamically store data and control the behaviors of the component(s) in which it is used. We use it by calling the useState and setState hooks to define an initial state and change the state, respectively.
Describe the relationships between the components on a high-level: which components were siblings? Which components were nested within each other? PlayerSubmissionForm, RecentSubmission, and FinalPoem are siblings, which are all nested in the parent component Game. Game and its children components are nested in App.
How did this project differ from in-class examples? There are lots of little differences in the code, but the two that stand out most are determining how to display the FinalPoem in the correct format on new lines and how to hide the PlayerSubmissionForm and RecentSubmission components when the final poem is revealed. I also didn't need to devise a helper function to get a new key for each element pushed to newSubmissionList, because player already increments on each form submission and is therefore unique.
How was this project similar to in-class examples? The PlayerSubmissionForm event handlers are similar, as well as the callback function that's called on each form submission. The concepts of passing data from Game to its child components as well as using dynamic styling are also similar.

peachmakkoli added 21 commits April 22, 2020 16:53
…putChange event handler, simplifies return function
…s converting it into a line of poetry, rather than Game
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.

1 participant