import React, { Component } from 'react'; import '../css/Intent.css' class IntentItem extends Component { constructor(props){ super(props); this.state={intent: props.intent, index: props.index, onClick: props.onClick}; } render() { return (
{this.state.onClick(this.state.intent)}}>

{this.state.index+1}. {this.state.intent.questions[0]}

); } } export default IntentItem;