In react, the video element is obtained through createRef, and the first print is null?

export default class TrailResult extends Component {
constructor () {

super()
this.video = React.createRef()

}
}

showVideo = () = > {
const video = this.video.current
console.log (this.video)
}

render () {
return (
< video ref= {this.video} style= {{width: "600px"}} >
Video Test
< / video >)
}

Sorry, I don"t know how to adjust the code format for the first time. Try

first.
Jun.20,2022
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e8d0bc-112b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e8d0bc-112b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?