411 Week Two — The Struggle Is Real

Monica Suarez
2 min readSep 28, 2020

This week we are amping up using components in React, and using conditional logic/ternary operators to manipulate elements in our code. Getting the puzzle pieces all in place has been fairly challenging but I am moving forward and figuring it out (just very slowly).

Discuss in words something you learned in class today or this week. | I have been learning how to create props and connect components to other pages in react.

What is the difference between state and props? | State is used locally, while props are used to pass properties to components on other files/folders (like using export in a way).

What is ReactDOM? What is the difference between ReactDOM and React? | The ReactDOM module exposes DOM-specific methods, while React has the core tools intended to be shared by React on different platforms.

What is React.createClass? | React.createClass allows one to generate component classes.

Which (if there is) node library method could you use to solve the algorithm problem you solved last night in your pre-homework? | npm-react-select

Which (if there is) node library method could you use to solve the algorithm problem you solved in class tonight? | npm react-select-search

Explain event delegation in JavaScript and why it is useful. | Event delegation allows one to avoid adding event listeners to specific nodes; instead, the event listener is added to one parent. That event listener analyzes bubbled events to find a match on child elements. It is useful because there are less event handlers to setup and reside in memory, which results in better performance.

Which new JavaScript / browser features are you most excited about and why? | Arrow functions eliminate the need for binding methods in React.

--

--