ref.current is always undefined when using ref from forwardRef

import React, { useRef } from “react”; import { render } from “react-dom”; const styles = { fontFamily: “sans-serif”, textAlign: “left” }; const Wrapper = () => { const ref = useRef(); return <App ref={ref} />; }; const App = React.forwardRef( ({ placeHolder, onNameSelected, error, onSuggestion }, ref) => { ref.current.setAttribute(“he-de-data”, “”); return ( <div…

Details