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-urql) - Fix React warning on cross-component updates #630

Merged
merged 4 commits into from
Mar 17, 2020

Conversation

kitten
Copy link
Member

@kitten kitten commented Mar 17, 2020

Resolve #600

Summary

This prevents us from triggering updates across components in render by preventing getCurrentValue from being able to trigger updates in other subscriptions with a simple global flag.

Set of changes

  • Add global flag to useSource's getCurrentValue
  • Replace use-subscription with custom code

@changeset-bot
Copy link

changeset-bot bot commented Mar 17, 2020

🦋 Changeset is good to go

Latest commit: 5b587e9

We got this.

This PR includes changesets to release 1 package
Name Type
urql Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@kitten kitten changed the title Fix react-urql warning due to cross-component updates from getCurrentValue (react-urql) - Fix warning due to cross-component updates from getCurrentValue Mar 17, 2020
@kitten kitten marked this pull request as ready for review March 17, 2020 17:20
@kitten kitten changed the title (react-urql) - Fix warning due to cross-component updates from getCurrentValue (react-urql) - Fix React warning on cross-component updates Mar 17, 2020
@kitten kitten merged commit eb94904 into master Mar 17, 2020
@kitten kitten deleted the experiment/disregard-current-value-sub branch March 17, 2020 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

React 16.13.0 'Warning: Cannot update a component from inside the function body of a different component.'
2 participants