When the WrappedComponent is rendered the ref callback will be executed, and then you will have a reference to the WrappedComponent’s instance. This can be used for reading/adding instance props and to call instance methods.
React Higher Order Components in depth
franleplant
5.5K38

It would be really helpful if you provided a practical example which actually reads instance props and calls instance methods in a useful way. I’m not sure how the full cycle works here or what I’d use this pattern for. Could I use this to interrogate the wrappedComponentInstance’s state and output it for debugging purposes?

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.