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

Sherman Christina Litter-Patrol #32

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

Conversation

Peacegypsy
Copy link

Litter Patrol

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
How are events / event handlers and this.state connected? event handlers change this's state when an event is instigated(a button is clicked)
What are two ways to do "dynamic styling" with React? When should they be used? Inline styling and styles objects in our render function.
Much like Rails works with the HTTP request->response cycle, React works with the browser's input->output cycle. Describe React's cycle from receiving user input to outputting different page content.
User input triggers change in virtual dom, virtual dom updates DOM, then DOM renders itself to the browser. In a cycle.
Compare how React and Rails' views differ. Given different circumstances, these systems have different goals. How does this impact on their design and how we are supposed to use them?

What was a challenge you were able to overcome on this assignment? | Breaking the task down into an understandable size. The amount of code to read through was daunting at first and made the task seem MUCH bigger than it actually was.

CS Fundamentals Questions

Question Answer
Consider the code on the first few lines of App.render (it starts with this.state.items.map). What is the Big-O time complexity of this code, where n is the number of active game items? 0(n)
What part of React might benefit most from the use of specific data structure and algorithms? we want to hold our data in higher level objects. We want our algorithms to be very efficient and anywhere we want to render.

Consider what happens when React processes a state change from setState -- it must re-render all of the components that now have different content because of that change.

What kind of data structure are the components in, and what sort of algorithms would be appropriate for React's code to "traverse" those components?
Speculate wildly about what the Big-O time complexity of that code might be. | The DOMs structure is a tree, so it has to traverse the branches of said tree. Wild-speculation 0(n).

@dHelmgren
Copy link

Litter Patrol

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene Good
Comprehension questions Missing a couple. To your final answer: Jackie C posted something in the slack a few days ago that I have been thinking about a lot. "Code is read a lot more than it's written". I'd never really thought about it in those terms before, but it's very true: every big project in a company has many eyes looking over the code on a daily basis, but even single-user projects are read by their owners countless times when trying to debug. Getting comfortable looking at code, and looking at a heck of a lot of it is very healthy for us as developers, because writing good DRY code means having a good understanding of what's already there.
Functionality
Clicking on litter or nature shows a check or X respectively Yes
Clicking on litter appropriately updates the score yes
Under the Hood
JavaScript is well-organized and easy to read yes
Functions are named appropriately yes
Callback functions are passed to components appropriately yes
Overall Good work on this assignment! Your use of callback functions tells me that the important learning goals for this assignment were met.

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