Is it ok to pass class component reference to child component in react

I am thankful for you giving your time,

do you mean to say, with useImperativeHandle or with ref we can achieve same feature of my example, even if yes, it looks extra complicated things being added, what could have been simply done.

See I am really not the person, that I won’t understand what other person is trying to explain, if you please can you add example for your explanation, I am not demanding, I simply feel, it’s not an easy way.

Regarding code smell, only because one class is modifying other class’s properties. We have to think twice.

the whole concept of state is there so that it can be modified internally,

whether a class itself modifies or it gives right to some child to modify – it’s kind of similar thing, it’s only delegation that is the addition

Always to note, that the parent has full control over child. if child is not acting as per parent, the child can be replaced by parent.

To add one more point, we are anyways giving every component the right to modify whole redux store by useDispatch, thus argument of code smell doesn’t hold so strong for React per se

Again I am thankful for your answers