I'm gathering data from different places, and the goal is to map them inside an input field, so users can edit or instantly copy the data.
Right now i'm gathering all the data inside an array, throughout the state which i'm printing inside an input field using the .map function.
My questing being: how can i add a break after each mapped item inside the input field.
The following does not work (note i tried adding < br > to the output but it will just give me < Object object >):
render() {
const {data} = this.props
const listData = data.map((data) => data.tc + <br/>);
return (
<Form className="flex-item-100">
<FormGroup>
<Label for="exampleText">Test Cases</Label>
<Input readOnly type="textarea" name="text" id="exampleText" value={listData} />
</FormGroup>
</Form>
);
}