Open
Description
Describe the bug
When using the provided example, no data is populated into the state.
To Reproduce
Use that example
import { useFetch } from "use-http";
function Data() {
const {
loading,
error,
data = [],
} = useFetch(
"https://myserver.com/?query=toto",
{},
[]
);
return (
<>
{JSON.stringify(data, error, loading)}
</>
);
}
export default Data;
Expected behavior
The data appears into the data attribute
Actual behavior
The request is executed and visible into the Network tab of the Chrome Dev Tools, but no data is put in the state.
Metadata
Metadata
Assignees
Labels
No labels