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

hayden - edges c10 #41

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

haydenwalls
Copy link

@haydenwalls haydenwalls commented Dec 1, 2018

Litter Patrol

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
How are events / event handlers and this.state connected? this.state is a handy way to keep track of dynamically changing states of components; the dynamic aspect is usually interacted with via events and their event handlers
What are two ways to do "dynamic styling" with React? When should they be used? inline styling and external styles applied via a dynamically assigned variable. as far as i was told, inline styling should never be used.
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. uhhh the browser receives user input triggering an event, react runs whatever code handles that event, and then checks the actual DOM vs the changed virtual DOM and only re-renders the components that have been changed
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? rails views are primarily based around single pages, whereas react is based around individual components that can be reused. this is kind of similar to rails partials, actually, but still different because the whole thing is approached from a javascript angle first and foremost rather than trying to shoehorn ruby code into html files. rails design is more like laying out the pages for a book, where i see react design as more like a bunch of modular puzzle pieces.
What was a challenge you were able to overcome on this assignment? wrapping my head around passing data forward and back between nested components

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? time complexity is O(n) because the .map function runs its internal code once per item in the array
What part of React might benefit most from the use of specific data structure and algorithms? the comparison between virtual DOM and actual DOM?
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.

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