如何将从 API 获取的数据作为道具传递给其路由在 React JS 的另一个页面中定义的组件?

How to pass data fetched from an API as props to a component whose routes is defined in another page in React JS?

我正在为此使用功能组件,并为 api 调用使用 axios

我昨天也遇到了同样的问题,我在这里问了同样的问题 link 检查一下,如果您需要进一步说明,请告诉我