I am new to reactjs
.I am trying to set herf
attribute to the anchor element but getting warning like Unknown prop herf on <a> tag. Remove this prop from the element
.
In employees.js.jsx
file:
var Employees = React.createClass({
render: function() {
employees = this.props.props.employees.map( function(employee) {
return (
<tr key={employee.id}>
<td>{employee.name}</td>
<td>{employee.email}</td>
<td>{employee.manager}</td>
<td><a herf={'/employees/' + employee.id}>Edit</a></td>
</tr>
);
});....
How do i set herf
attribute to the element.Thanks.
答案 0 :(得分:1)
锚元素没有herf
属性,将herf
更改为href
。