Comment <React.StrictMode> in index.js
root.render(
// <React.StrictMode>
<App />
// </React.StrictMode>
);
After fetch console.log in React component like this:
const function = () => (
<>
{console.log(data)}
</>
);
return (function())
Before return getting {} and {data} after fetch...
No comments:
Post a Comment