Focus on mount with React

function App() {
	const buttonRef = useRef()
 
	React.useEffect(() => {
		buttonRef.current.focus()
	}, [])
 
	return (
		<button ref={buttonRef}/>
	)
}