63
rated 0 times
[
67]
[
4]
/ answers: 1 / hits: 59146
/ 9 Years ago, thu, january 14, 2016, 12:00:00
// This Javascript <a> tag generates correctly
React.createElement('a', {href:mailto:+this.props.email}, this.props.email)
However, I'm struggling to recreate it in JSX
<a href=mailto: {this.props.email}>{this.props.email}</a>
// => <a href=mailto: {this.props.email}></a>
The href tag thinks the {this.props.email}
is a string instead of dynamically inputting the value of {this.props.email}
. Any ideas on where I went amiss?
More From » reactjs