drcmda / react-contextual

🚀 react-contextual is a small (less than 1KB) helper around React 16s new context api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Named Context not working as expected?

JJLost opened this issue · comments

CodeSanbox altered "multiple context" example

Just wondering if i misused the framework or there is something wrong. I would expect the Greet function to update similar to how the Hello component does.

Any thoughts?

commented

@JJLost no, it absolutely should work. Strange that it doesn't.

I updated the dependencies in that sandbox and now it seems to be ok: https://codesandbox.io/s/o53o7kq8k9

I tested it against the react alpha (in which case it doesn't use the polyfill) and against the current stable react (and react-broadcast as polyfill). Both seem to be ok. I guess either a bug in the old contextual or react 16.0.0.