Open
Description
Describe the bug
useFetch
crashes the SSR server if the code makes any call to the getter for a response
. The getter uses instanceof Response
, expecting Reponse
on the global namespace, which is undefined in Node.
To Reproduce
Steps to reproduce the behavior:
- Create a React component that uses
useFetch
- Add the following to its render function:
const {response} = useFetch('https://localhost:4001')
const responseStatus = response.status
- Render using Node
Expected behavior
The getter for responses should return the right value whether on the server or on the client.
Metadata
Metadata
Assignees
Labels
No labels