On the road to finishing my class — JS411 starts up

Monica Suarez
2 min readSep 21, 2020

My web development journey isn’t over, but I’m at the final stretch of my program. During this course, we are tying together everything we have learned and building our Capstone project! React is actually a lot of fun and will make it a lot more streamlined to render an app.

Discuss in words something you learned in class today or this week. | We are learning about components for React.

Why/when would you use a class-based component vs a functional component? | If you are writing a presentational component which doesn’t have its own state or needs to access a lifecycle hook, use functional components as much as possible. For state management, use class component.

What is create-react-app? | It is a command used in the terminal to create a React app.

What are the differences between a class component and a functional component? | A functional component is just a plain JavaScript function which accepts props as an argument and returns a React element. A class component requires you to extend from React.

What is JSX? | JSX stands for JavaScript XML. JSX allows us to write HTML in React.

How does React work? | React is a JavaScript library that creates user interfaces in a predictable and efficient way using declarative code.

How does the virtual DOM work in React? | React uses virtual DOM to enhance its performance. It uses the observable to detect state and prop changes.

Which (if there is) node library method could you use to solve the algorithm problem you solved last night in your pre-homework? | I used npm install react-animated-heart to create a heart react for a pub app.

What’s the difference between an element and a component in React? | A component is used to create elements. An element is a simple object that describes a DOM node and its attributes or properties

--

--