API在React中的集成,但未正确调用API。

huangapple go评论65阅读模式
英文:

API integration in React but not call API properly

问题

I have my own API I'm using React TypeScript and I want to show my API data into my React table but here the problem is API call not properly response is showing undefined in console.

How to solve this problem?

英文:

I have my own API I'm using React typeScript and I want to show my API data into my react table but here proble is API call not properly response is shows undefined in console.

How to solve this problem?

答案1

得分: 0

你好,Jayprakash,
我认为你可以附上一些屏幕截图或代码片段,以帮助你找到问题。

此外,下面是一个链接,显示了使用fetchAPI进行数据获取的步骤。

https://www.freecodecamp.org/news/how-to-consume-rest-apis-in-react/

你也可以使用axios、react-query等方法。

英文:

Good day Jayprakash,
I think you may attach few screenshots or code snippets to help you spot the issue.

Also, below is a link to show you steps for data fetching using fetchAPI.

https://www.freecodecamp.org/news/how-to-consume-rest-apis-in-react/

You could also use axios, or react-query, ....etc

huangapple
  • 本文由 发表于 2023年5月13日 23:13:36
  • 转载请务必保留本文链接:https://go.coder-hub.com/76243465.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定