The code in main App component is as follows :
class App extends Component { componentDidMount(){ console.log(this.ref); debugger; } render()
If your component are related (parent and child ) you can assign ref to child and can use it in parent
If not then getElementById will come to rescue, but while selecting it please assign html type ex.
getElementById
const info = (document.getElementById("info") as HTMLDivElement)