React set focus on input after render

What’s the react way of setting focus on a particular text field after the component is rendered?

Documentation seems to suggest using refs, e.g:

Set ref=”nameInput” on my input field in the render …

ReactJS call parent method

I’m making my first step in ReactJS and trying to understand communication between parent and children.
I’m making form, so I have the component for styling fields. And also I have parent component …