Ref Demo - Focus

How this works

When the page loads, we use this.firstNameRef.current.focus() to set focus on the First Name input.
When we press 'Enter' in the First Name input, we use this.lastNameRef.current.focus(); to set focus on the Last Name input.

Codepen Demo

https://codepen.io/deniapps/pen/xxVGxNv