¿Cómo puedo acceder al componente principal div ref desde el componente secundario anidado?
Aplicación.js
const appRef = useRef() <div ref={appRef}> <div> <Switch> <PrivateRoute path="/products"> <Products /> </PrivateRoute> </Switch> </div> </div>Productos.js
componentDidMount(){ console.log(this.props.innerRef) // undefined } render(){ return ( <PopUp /> ) }PopUp.js
const PopUp = forwardRef(function PopUp(props,ref){ console.log(ref) // null console.log(ref?.current?.offsetWidth) // undefined })