Controlled Components Flashcards

(4 cards)

1
Q

What is a controlled component in React?

A

A controlled component is a component whose form elements are controlled by React state.

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

How do you create a controlled input in React?

A

Provide an onChange handler to update the state.

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

How do you cleat value of controlled component?

A

set the state id the variabke ti empty or null value

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