UseEffect - Use state to create an external Link
You have to use a state in your component :
const [url,setUrl] = useState('');
and render it :
<a target="_blank" href={url}>Google Link</a>
and in the use effect :
useEffect(() => {
getUrl()
.then(x => x.json())
.then(x => {
const { result } = x;
// use set url hook
setUrl(result);
});
});