You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Each time a child component of Context.Consumer calls setState, its parent Context.Consumer re-renders.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:
Presumably the expected behavior is one where setting the state of a child component does not affect any parent Context.Consumer components, particularly when that state does not change
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
Versions
16.3.0-alpha.1
16.3.0-alpha.0
Browser
Chrome (OSX 10.13.3) 64.0.3282.140
This works as expected when the previous context API is used
The text was updated successfully, but these errors were encountered:
jaredLunde
changed the title
Context.Consumer unexpectedly updates each time a child component calls setState
Context.Consumer unexpectedly updates each time one of its child components call setState
Feb 12, 2018
Do you want to request a feature or report a bug?
What is the current behavior?
Context.Consumer
callssetState
, its parentContext.Consumer
re-renders.If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:
What is the expected behavior?
Context.Consumer
components, particularly when that state does not changeWhich versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
The text was updated successfully, but these errors were encountered: