Description
Do you want to request a feature or report a bug?
BUG
What is the current behavior?
Consumer rendered by invokes ReactDOM.unstable_renderSubtreeIntoContainer, invokes render function with DEFAULT context value ignoring value of Provider
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:
Open example on Codesandbox.io
- Click "Increment state.contextValue"
=>State should change to 1, and ChildComponent rendered directly will show it - Click "Render into placeholder"
=> ChildComponent rendered through unstable_renderSubtreeIntoContainer should show 1
Actual result: ChildComponent rendered through unstable_renderSubtreeIntoContainer should show 111 (which is default value specified in createContext)
What is the expected behavior?
unstable_renderSubtreeIntoContainer should pass context through to consumer
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
React: 16.3.0
Chrome: 65 x64
Windows: 10 x64