Home
Recent Q&A
Java
Cloud
JavaScript
Python
SQL
PHP
HTML
C++
Data Science
DBMS
Devops
Hadoop
Machine Learning
Azure
Blockchain
Devops
Ask a Question
What are controlled and uncontrolled components in React?
Home
ReactJS
What are controlled and uncontrolled components in React?
asked
Jul 2, 2019
in
ReactJS
by
Venkatshastri
(
1.4k
points)
What are controlled and uncontrolled components in React?
#reactjs
#redux
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Jul 2, 2019
by
Venkatshastri
(
1.4k
points)
A
Controlled Component
is one that takes its current value through props and notifies changes through callbacks like onChange. A parent component “controls” it by handling the callback and managing its own state and passing the new values as props to the controlled component. You could also call this a “dumb component”.
A Uncontrolled Component is one that stores its own state internally, and you query the DOM using a ref to find its current value when you need it. This is a bit more like traditional HTML.
Related questions
0
votes
Q: What are controlled and uncontrolled components?
asked
Nov 26, 2019
in
ReactJS
by
AdilsonLima
(
6.2k
points)
#reactjs
#redux
#safe-agile
0
votes
Q: What is the difference between React context and React redux?
asked
Jun 19, 2020
in
ReactJS
by
JackTerrance
(
2.7k
points)
#redux
#reactjs
0
votes
Q: The chief difference between React Native and React is ________.
asked
Mar 1, 2020
in
ReactJS
by
RShastri
(
1.7k
points)
#reactjs
#redux
react-native
0
votes
Q: What is the difference between HTML and React event handling?
asked
Jul 2, 2019
in
ReactJS
by
Venkatshastri
(
1.4k
points)
#reactjs
#redux
0
votes
Q: What is the difference between React Native and React?
asked
Jul 2, 2019
in
ReactJS
by
Venkatshastri
(
1.4k
points)
#reactjs
#redux
0
votes
Q: What are the lifecycle methods going to be deprecated in React v16?
asked
Jul 2, 2019
in
ReactJS
by
Venkatshastri
(
1.4k
points)
#reactjs
#redux
#state
0
votes
Q: How events are different in React?
asked
Jul 2, 2019
in
ReactJS
by
Venkatshastri
(
1.4k
points)
#reactjs
#redux
#redux#state
0
votes
Q: What are the advantages of React?
asked
Jul 2, 2019
in
ReactJS
by
Venkatshastri
(
1.4k
points)
#reactjs
#redux
#redux#state
...