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.

endless looop upon react render when suspend: true

See original GitHub issue

Since version 0.4.0 I am getting an infinite loop on startup of our app. 0.3.1 works fine, but 0.4.0 and 0.4.1 are ending in this loop:

image

my component uses the simple useQuery call. Note this does not occur when I manually handle loading states-only when suspend: true is passed.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
trojanowskicommented, Mar 1, 2019

@capaj Could you please provide a reproduction on https://codesandbox.io? As a source you can use https://www.graphqlhub.com (GraphQL API url: https://www.graphqlhub.com/graphql, example query here).

0reactions
wintercountercommented, Jul 9, 2019

We’re having the very same issue now. It started to happen after we dropped IE11 support for our codebase, removed babel-polyfill, fetch polyfill and transform-regenerator. We’re still investigating what’s happening.

Read more comments on GitHub >

github_iconTop Results From Across the Web

3 ways to cause an infinite loop in React - Alex Sidorenko
React limits the number of renders to prevent an infinite loop. Here are 3 potential causes of the infinite loop in React.
Read more >
"Error: Too many re-renders. React limits the number of ...
The reason for the infinite loop is because something (most likely setState ) in the event callback is triggering a re-render.
Read more >
How to Solve the Infinite Loop of React.useEffect()
After initial rendering, useEffect() executes the side-effect callback that updates the state. The state update triggers re-rendering. After re- ...
Read more >
5 useEffect Infinite Loop Patterns | by Naveen DA
It is good to know the infinite loop patterns of React. ... React which is “When state or Props is changing, the component...
Read more >
Preventing infinite loops in componentDidUpdate() ✏️
ComponentDidUpdate() is prone to infinite loops. To prevent this problem, pass prevProps and prevState to componentDidUpdate(), compare them ...
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