Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

childContextTypes cannot be defined on a functional component. #1259

Closed
kamek-pf opened this issue Jul 4, 2016 · 6 comments
Closed

childContextTypes cannot be defined on a functional component. #1259

kamek-pf opened this issue Jul 4, 2016 · 6 comments

Comments

@kamek-pf
Copy link

kamek-pf commented Jul 4, 2016

I'm upgrading a React Native app, now whenever a render happens I'm seeing this in the logcat :

ReactNativeJS: Warning: RelayRootContainer(...): childContextTypes cannot be defined on a functional component.

I assume the warning is related to this : facebook/react#6933
Is anybody else seeing those ?

@kamek-pf
Copy link
Author

kamek-pf commented Jul 4, 2016

Looks like I simply needed to move from Relay.RootContainer to Relay.Renderer.
My bad, sorry for the noise.

@kamek-pf kamek-pf closed this as completed Jul 4, 2016
@grydstedt
Copy link

I'm seeing this. Is RootContainer no longer supported? If it is this ticket should be re-opened.

@kamek-pf
Copy link
Author

kamek-pf commented Jul 7, 2016

My understanding is that they are slowly transitioning to Relay.Renderer :
https://facebook.github.io/relay/docs/api-reference-relay-renderer.html#content

The APIs are similar, it was quite easy to move from Relay.RootContainer to Relay.Renderer.

@maxcodes
Copy link

maxcodes commented Jul 7, 2016

I also got bit by this. Is there any way to know about these breaking changes beforehand? Where do they get announced?

@kamek-pf
Copy link
Author

kamek-pf commented Jul 7, 2016

You might want to read the release notes : https://github.com/facebook/relay/releases

This particular change was introduced in v0.8.0 : https://github.com/facebook/relay/releases/tag/v0.8.0

This doesn't really qualify as a breaking change since it's just a warning and the old API still works.
However, I'd say Relay (along with GraphQL, React and React-Native) is one of the few tools where it's a good idea to read the changelog before upgrading because the API is still evolving.

@josephsavona
Copy link
Contributor

Yup, this wasn't a breaking change. RelayRootContainer is still supported and not officially deprecated. We'll have a bug fix to avoid the warning in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants