Chemistry, asked by lovelistedadnan8587, 11 months ago

input is a void element tag and must neither have `children` nor use `dangerouslysetinnerhtml`. in react

Answers

Answered by aqsaahmed19945
1

This standard applies when void components have either children / youngsters or dangerouslySetInnerHTML prop.  

HTML components, for example, <area/>, <br/>, and <input/> will be void components which are just self-shutting with no substance.  

In this way, React will toss a special case that you set either kids or dangerouslySetInnerHTML prop for a void component.

Similar questions