Blog 402

David Hebert
1 min readJan 24, 2021

Discuss in words something that you learned in class today or this week.

We’ve mostly been focused on React this week. It’s definitely different to how I’ve been building websites in the past, and it’s hard to wrap my brain around.

What is the difference between between state and props?

Props are objects that a React app accepts as its first argument. States are data that change during the instance.

What is ReactDOM? What is the difference between ReactDOM and React?

ReactDOM is a package that allows for DOM specific methods to be used in an app.

React is a library that works with JavaScript to build UIs faster and easier.

What is React.createClass?

React.createClass creates a class that can take in certain values such as a state, so that an app will function correctly under certain conditions.

Explain event delegation in JavaScript and why it is useful.

Event delegation lets us us use event.target to handle multiple lines of code using a similar method.

--

--