Discuss in words something you learned in class today or this week.
Conditional rendering is to render something to the page if a condition is true. You can used if/else, ternary operators, or short circuit operators to do so. This is incredibly useful in conjunction with React state and is basically how we decide what the page shows when a user changes something.
What is the difference between state and props?
State is a JS object with key-value pairs and kept track of on the component level. State can be changed. Props are used to pass data between components and cannot be changed.
ReactDOM? What is the difference between
ReactDOM is responsible for rendering to the page. It used to be built in to react, but with the advent of React Native it was split off.
It seems that this is an older way to say extends React.component and can be used to write React code without ES6. Now, why someone would want to do something in 2021 is beyond me.
The idea is that if we have a lot of elements handled in a similar way, then instead of assigning a handler to each of them we put a single handler on their common ancestor.