score:4

Accepted answer

either pull out the concatenation out of the href or use bacticks to fill the href.

<a href={`mailto:${customeremail}?subject=quote&body=i%20would%20like%20to%20accept%20this%20quote`} >
   <button>click to accept</button>
</a>

score:3

you are missing the curly braces inside the href attribute:

var customeremail = "someone@email.com";

<a href={'mailto:' + customeremail + '?subject=quote&body=i%20would%20like%20to%20accept%20this%20quote'} >
  <button>click to accept</button>
</a>

the curly braces are a special syntax to let the jsx parser know that it needs to interpret the contents in between them as javascript instead of a string.


Related Query

More Query from same tag