I am getting an below error. I can see that I have to return array instead of object. But I am really not sure how to fix it. Thanks in advance
Object
JSON.stringify()
because this.state.timeElapsed is the object. object not able to print in normal standered. Thus we need to render that object in JSON.stringify(). It converted into JSON form.
this.state.timeElapsed
Try this, It's work for me
{JSON.stringify(this.state.timeElapsed)}