How can i create a dinamic href by async function?

  javascript, reactjs

why i get object promise, i want to get the url just that what happen?

this is my code:

<Link href={getUrl()}>
  'show show show'
</Link>

my function is:

const getUrl = async () => { 
 
      
      return await getUrltoGo()
    
  }

in that function i need to do await request to my bd

enter image description here

Source: Ask Javascript Questions

LEAVE A COMMENT