As I said this principle is not for React rather for object-oriented languages. We have to improvise in some way. I will be happy to see a better implementation though.
--
Software Developer | https://www.mohammadfaisal.dev/
Love podcasts or audiobooks? Learn on the go with our new app.