Since an uncontrolled component keeps the source of truth in the DOM, it is sometimes easier to integrate React and non-React code when using uncontrolled components. It can also be slightly less code if you want to be quick and dirty. Otherwise, you should usually use controlled components.
🙏 1
➕ 1
o
Oleksandr Karpovich [JB]
12/01/2021, 4:00 PM
If you're implementing a new component you can make "controlled" only for the beginning until you see a need to have it uncontrolled.
🙏 1
o
Oliver.O
12/01/2021, 5:04 PM
So at least in my MDC use case, it's just the opposite: Easier to integrate in controlled mode. I'll be following that path until YAGNI evaluates to