Skip to content

forwardRef prevent data to be load server side in child component #3955

@seb-saletes

Description

@seb-saletes

Intended outcome:

Create custom HOC with React.forwardRef and load data server side using NextJs + Apollo.

Actual outcome:

Data are not loaded server side.

How to reproduce the issue:

I created a repo where I reproduced my use case: https://github.com/seb-saletes/next-apollo-forwardRef-issue
Go to pages/index.js and comment in and out the different version of the same HOC and disable javascript from your browser

I also posted the issue on NextJs repo: vercel/next.js#5299

Versions

System:
OS: macOS 10.14
Binaries:
Node: 10.11.0 - /usr/local/bin/node
Yarn: 1.10.1 - /usr/local/bin/yarn
npm: 6.1.0 - /usr/local/bin/npm
Browsers:
Chrome: 69.0.3497.100
Firefox: 61.0.2
Safari: 12.0
npmPackages:
apollo-boost: ^0.1.16 => 0.1.16
react-apollo: ^2.1.11 => 2.2.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions