The thing here is, you can have OOP toolkits that make writing custom components easy. And then you have encapsulation and composition, without needing the React machinery. It is the case though, that the most well known OOP UI toolkits see creating custom components as a somewhat advanced use case and don't optimize for it, whereas in ReactJS/JetPack Compose, it's fundamental and you do it all the time.