get class name of focus div react js code example Example: How to set focus on an input field after rendering? componentDidMount(){ this.nameInput.focus(); }