I have an API, with Node and MongoDB.
I do the following component with this request :
export default function Balance() {
const uid = useContext(UidContext)
useEffect(() => {
axios({
method: "get",
url: `${process.env.REACT_APP_API_URL}api/balance/${uid}`
}).then(response => console.log(response.data[0]));
}, [uid]);
return (
<section>
Walet
</section>
)
}
And I get an error, AND the results I want : Result
I don't understand why I get an error, and then the code 200 ?
Thank you !