-
Notifications
You must be signed in to change notification settings - Fork 101
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
make typings of children/render prop optional to allow composition #137
Comments
Yep composition with types sucks. But I wouldn't like to provide leaky types to solve this problem. |
It worked with react-apollo, so maybe use the types they use? |
I don't see they use anything special. @pedronauck could you clarify how |
Ah you're right, they basically enforce children prop as well
I was wrapping my queries/mutations which is why the error wasn't appearing Hmm I wonder if anything can be done about this |
React team works on this problem. They probably will suggest a custom syntax like this, so type systems could solve the problem on syntax level.
|
We don't care about the component type definition, this should be a components concern. When something like this happens to me, usually I change the
So, of course, this can be leaky for powerplug! What you can do is use the
|
Ok, so wrapping them or passing render prop is way to go given limitations of typings |
Right now you either have to have a
render
orchildren
propSo you can't do this:
The text was updated successfully, but these errors were encountered: