Open
Description
👋 hi, wondering how to pass a function to a component. Trying to use the Query
component from react-apollo
.
const hyperx = require('hyperx');
const { Query } = require('react-apollo');
const gql = require('graphql-tag');
const { createElement } = require('react');
const hx = hyperx(createElement);
hx`<${Query}
query=${gql`
{
// query here
}
`}
>
${({ loading, error, data }) => {
// function content here
}}
</${Query}>`
Returns:
Failed prop type: Invalid prop `children` of type `array` supplied to `Query`, expected `function`.
in Query
Metadata
Metadata
Assignees
Labels
No labels