3 ms·
A React component has no obligation to add a div or any other element to the DOM tree.
by tpict 6y ago
A React component has no obligation to add a div or any other element to the DOM tree.
- okareaman 6y agoDan Ambramov has stated the reason hooks was created was to avoid nesting hell that was used to manage state. I may be misunderstanding him. I am not s React expert.
- tpict 6y agoI believe "nesting hell" was in reference to obtuse state management architecture rather than DOM structure. It seems like a common misconception based off other comments on this post. Angular inserts a new custom element for every component so it's definitely a problem elsewhere, if not with React.