JSX help in React.js

I am getting error (Syntax error: Unexpected token, expected } (16:78)) in below code.

                       render() { 
                    return (<tr key={this.props.index}>
                        <td>Name</td>
                        <td>
                        { 
                            this.props.element ? 
                            <input type="text"/> : this.props.element <span className="edit">                                                   
                            Edit</span>
                        }
                        </td>
                  </tr>
                    );
	            }

What error?
The more info you will provide the better the help you’d get ^^

1 Like

replace element with this.props.element and remove () and {} around it.

1 Like

Thanks @Layer. I edited the code. Thanks.

1 Like

Thanks @jcunanan05. I followed your instruction but result is as before. I edited the code. Thanks.

I dont know if this part makes any sense…

So, you are using a intenary operator, cool there on if exists anything on this.props.element.

So, if it’s true, ok put the index

But if not, use this.props.element? I think there’s the error.