Reputation: 4475
I'm trying to add the class name "active" to links when they are clicked. I can't get this JSX to compile.
<li onClick={this.showDeals}><a className={(this.props.panel == 'deals') ? 'active' : ''>Deals</a></li>
<li onClick={this.showTasks}><a className={(this.props.panel == 'tasks') ? 'active' : ''>Tasks</a></li>
<li onClick={this.showActivities}><a className={(this.props.panel == 'activities') ? 'active' : ''>Activities</a></li>
What am I doing wrong?
ReactifyError: content.js: Parse Error: Line 740: Invalid regular expression while parsing file
Upvotes: 0
Views: 1105