React Basics Flashcards

1
Q

What is JSX?

A

JSX stands for JavaScript XML. It allows developers to write HTML-like code inside JavaScript, making it easier to create React components.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How does React differ from vanilla JavaScript or jQuery when updating the DOM?

A

React uses a virtual DOM. When state or props change, it creates a virtual update and then efficiently updates the real DOM only where changes occurred.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the key differences between class components and functional components in React?

A

Class components have lifecycle methods and can have state, while functional components are simpler and can utilize hooks for state and side effects.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly