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

Ports - Jillianne #45

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

Ports - Jillianne #45

wants to merge 4 commits into from

Conversation

jillirami
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 can change the value of this.state.
What are two ways to do "dynamic styling" with React? When should they be used? Inline styling and having an external style sheet (css file) are two ways to complete styling in React. The css file is preferred.
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. React responds to user input via event listeners and handlers that perform specific functions.
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? React only has views which are handled by components, whereas Rails has views along with a full MVC model that require different logic to perform differently.
What was a challenge you were able to overcome on this assignment? I was able to overcome the difficulty of determining where a className should be altered for a desired output to the user.

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? This is linear, iterating through a certain number (n) of game items.
What part of React might benefit most from the use of specific data structure and algorithms? props and state would benefit as that would allow components to get information from other components and have the potential for these values to be altered.
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 components may be in an array like structure where the data must be iterated through again when re-rendered. This may have a On^2 complexity.

@CheezItMan
Copy link

Litter Patrol

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene Good number of commits and good commit messages
Comprehension questions Check, listeners respond by updating state, which triggers a re-render and that causes the dom to update.
Functionality
Clicking on litter or nature shows a check or X respectively Check
Clicking on litter appropriately updates the score Check
Under the Hood
JavaScript is well-organized and easy to read Check
Functions are named appropriately Check
Callback functions are passed to components appropriately Check
Overall Nice work, you hit all the learning goals for the project!

height: PropTypes.number.isRequired,
layer: PropTypes.number.isRequired,
type: PropTypes.string.isRequired,
addPoint: PropTypes.func.isRequired,

Choose a reason for hiding this comment

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

👍

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