undefinedfix
Sign in

How to get drawing component object in parent component

MikeRyz edited in Sat, 24 Sep 2022

You need to listen to the scroll bar event in the draw and set ref to prompt function components cannot be given refs when getting component objects . Attempts to access this ref will fail . Did you mean to use React . forwardRef () , And the ref value is also empty.

Look at the source code, because the use of withconfigconsumer makes the class component become a function component, the original RC drawer setting ref is no problem.

How can I easily get the drawing component object without adding a layer of container?

0 Replies