React · Junior · Question 75 of 75
What does <input disabled={false} /> render?
- ✓Correct answer: An enabled input - React omits the attribute when the value is
false - 2A disabled input, because the attribute is present
- 3An error, booleans aren't allowed
Explanation
For boolean DOM attributes, true adds the attribute and false removes it. Writing just <input disabled /> means disabled={true}.