Accepted answer

The issue lies here: <div className={'alert alert-danger'}>{status}</div>

status is an object (console.log it to check), not a string.


The error is because status is an Object value.

React will not render this raw Object in virtual DOM. You need to convert or render only useful property.

<div className={'alert alert-danger'}>{JSON.stringify(status)}</div>

Related Query

More Query from same tag