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

Fix TypeError in with-graphql-hooks example #9658

Merged
merged 1 commit into from
Dec 12, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions examples/with-graphql-hooks/lib/with-graphql-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default App => {
return class GraphQLHooks extends React.Component {
static displayName = 'GraphQLHooks(App)'
static async getInitialProps(ctx) {
const { Component, router } = ctx
const { AppTree } = ctx

let appProps = {}
if (App.getInitialProps) {
Expand All @@ -22,14 +22,7 @@ export default App => {
try {
// Run all GraphQL queries
graphQLState = await getInitialState({
App: (
<App
{...appProps}
Component={Component}
router={router}
graphQLClient={graphQLClient}
/>
),
App: <AppTree {...appProps} graphQLClient={graphQLClient} />,
client: graphQLClient,
})
} catch (error) {
Expand Down