question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Passing options such as headers to useFetch will never resolve a response (no error either). The network request is still made and finishes, but the response does not resolve in the app.

WORKS: const { error, data } = useFetch(url); When logging out the useFetch arguments a successful request looks like this. image

FAILS:

const { error, data } = useFetch(url, {
  headers: {
    // SOME HEADERS HERE
  }
});

ALSO FAILS:

const { error, data } = useFetch(url, {}); // This is strange as defaultOpts are also {}

When logging out the useFetch arguments a failed request looks like this. image

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
dai-shicommented, Apr 3, 2019

One note just in case: This is an experimental library to try Fetch and Suspense. If you need more stable one without Suspense, I recommend another library of mine: https://github.com/dai-shi/react-hooks-async which has similar useFetch.

1reaction
tyleratredspacecommented, Apr 3, 2019

Wow, that works! You just saved me so much time!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Passing options Crossword Clue
Passing options NYT Crossword Clue Answers are listed below and every time we find a new solution for this clue, we add it...
Read more >
passing options Crossword Clue | Wordplays.com
The Crossword Solver found 30 answers to "passing options", 4 letters crossword clue. The Crossword Solver finds answers to classic crosswords and cryptic ......
Read more >
NEVER RUN OUT of PASSING OPTIONS with this ... - YouTube
IMPROVE GAMING PERFORMANCE AND MENTAL FOCUS WITH YIPPEE-KI-YAY-PRE-WORKOUT HERE AND USE THE CODE 'AUSSIEFIFA' FOR 10% DISCOUNT*ATP SCIENCE: ...
Read more >
Coaching Outside Defenders on Forward Passing Options
First touch should be forward. Head up upon receiving the pass. Scan the playing area for forward passing options. Technique of the appropriate...
Read more >
Passing Options · stripe/stripe-node Wiki - GitHub
Stripe's Node.js bindings allow you to pass additional options in the form of an object after the required arguments to any given method, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found