import React, { useState, useEffect } from 'react';
const FancyInput = React.forwardRef((props, ref) => (
<input ref={ref} placeholder={props.placeholder} >
</input>
));
function LoadingButton() {
const ref = React.createRef();
useEffect(() => {
console.log(ref)
ref.current.focus()
}, [])
return (
<div className="m-test-wrap">
<FancyInput ref={ref} placeholder="enter"></FancyInput>
</div>
);
}
export default LoadingButton;