Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[React 18] Bug: Maximum update depth exceeded on the ref prop when suspending #21876

Closed
enisdenjo opened this issue Jul 14, 2021 · 2 comments · Fixed by #21875
Closed

[React 18] Bug: Maximum update depth exceeded on the ref prop when suspending #21876

enisdenjo opened this issue Jul 14, 2021 · 2 comments · Fixed by #21875
Labels
React 18 Bug reports, questions, and general feedback about React 18 Type: Discussion

Comments

@enisdenjo
Copy link

Functional ref prop throws a Maximum update depth exceeded error when suspending.

React version: 18.0.0-alpha-464f27572-20210713

Steps To Reproduce

  1. Click on the suspend button: https://codesandbox.io/s/ref-set-too-many-times-jm0c3?file=/src/App.js.

The current behavior

Clicking on the suspend button throws a Maximum update depth exceeded error.

The expected behavior

Clicking on the suspend button suspends.

@enisdenjo enisdenjo added React 18 Bug reports, questions, and general feedback about React 18 Type: Discussion labels Jul 14, 2021
@gaearon
Copy link
Collaborator

gaearon commented Jul 14, 2021

I wonder if #21875 fixes this.

@gaearon
Copy link
Collaborator

gaearon commented Jul 14, 2021

Yeah it does.
https://codesandbox.io/s/ref-set-too-many-times-forked-jl54z?file=/package.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
React 18 Bug reports, questions, and general feedback about React 18 Type: Discussion
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants