react-restart / context

React context helpers
MIT License
12 stars 1 forks source link

Warning: Rendering <Context.Consumer.Consumer> is not supported #9

Closed nathanstitt closed 5 years ago

nathanstitt commented 5 years ago

it's caused by https://github.com/4Catalyzer/react-context-toolbox/blob/master/src/mapContextToProps.js#L12

See discussion around this at https://github.com/react-bootstrap/react-bootstrap/issues/3362

jquense commented 5 years ago

ya I raise my hand in defeat for providing a more flexible api :P I think what needs to happen is the RCT just needs to only accept the base Context object, like the new useContext hook does. We should update references in react-bootstrap to just use the Context

nathanstitt commented 5 years ago

Thanks @jquense yes, I think that's best. I was going to make a PR to do so but I think you can just revert https://github.com/4Catalyzer/react-context-toolbox/commit/fb0262ae53b9c3542624374f85a1060b7dddecdf

I updated react-bootstrap to always pass in Context.Consumer in https://github.com/react-bootstrap/react-bootstrap/pull/3368

nathanstitt commented 5 years ago

And thanks to https://github.com/react-bootstrap/react-bootstrap/pull/3368#issuecomment-437922378 I realize I completely mis-read your comment @jquense. I'll update the PR above to pass in Context instead of Context.Consumer.

nathanstitt commented 5 years ago

PR was merged into bootstrap, so we can close this now.