Skip to content

Tag: node.js

React + NodeJs Fetch issue

I am trying to fetch the following results of my api (which is working well) http://localhost:5000/api/continents into a react component (a simple array to begin with). Endpoint code extracted from server.js: Here is my continents.js code: And here is the App.js code: Issue: continents array is empty. No data…

How can I retry function?

I’m developing a script for personal needs. I need to retry if an error returned, but I don’t know how to fix it. how to resolve it? But I get the following error: TypeError: You may only yield a function, promise, generator, array, or object, but the following object was passed: “[object Ob…