This repository has been archived by the owner on Apr 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 787
Support React.createContext #1937
Labels
Comments
Follow up facebook/react#12640 |
I think it is in this PR |
Are there any plans to release a 2.x minor that includes support for createContext? |
We also forked the getDataFromTree utility at my company in order to implement createContext support, would you all be interested in merging a PR with those changes if I opened one? |
@hamlim would you mind putting this in a gist? |
Sure: https://gist.github.com/hamlim/58aec71b7d91871ee0d001621a4969e8 The createContext related changes happen around line 100 |
I would definitely like this support. Without this, |
@piglovesyou it's been resolved, see #1978. |
vovacodes
added a commit
to vovacodes/react-apollo
that referenced
this issue
Oct 26, 2018
….3 context API The old way of passing the context still exists side-by-side with the new way to allow gradual migration of <Query>, <Mutation> and other modules that access the context in the "old" way. This should unlock "user space" experiments with react hooks and react-apollo because if yoou want to access the context(client) in a hook, the context has to be exposed using the "new" context API closes apollographql#1937
vovacodes
added a commit
to vovacodes/react-apollo
that referenced
this issue
Oct 27, 2018
….3 context API The old way of passing the context still exists side-by-side with the new way to allow gradual migration of <Query>, <Mutation> and other modules that access the context in the "old" way. This should unlock "user space" experiments with react hooks and react-apollo because if yoou want to access the context(client) in a hook, the context has to be exposed using the "new" context API closes apollographql#1937
Closed
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I am the creator of Loadable Components. I would like to thank you for this awesome library. I inspired from your code, especially the getDataFromTree.
I found that React.createContext is not supported. I patched it in gregberge/loadable-components#65. You can take the patch, it works.
But I think it would be nice to create a separated package to walk a tree in React, a lot of other libraries rely on it.
The text was updated successfully, but these errors were encountered: