The details HTML element doesn't work well when used as a controlled component in React. At first, I thought it was a React bug, but at the end of my investigation, I concluded it’s simply a mistake – not having a single source of The onToggleevent listener toggles isOpen, which changes the openattribute – so we’re back to step 2, hence the infinite loop.
Table of contents
Why? #Workarounds #What about other frameworks? #Not a React bug? #Closing thoughts #3 Comments
Sort: