Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Make RelayRenderer isomorphic #589

@denvned

Description

@denvned

I could make a PR based on this: https://github.com/denvned/isomorphic-relay/blob/v0.2.1/src/IsomorphicRenderer.js

Currently, _runQueries is an async operation, so it should not be called during server side rendering. That's why I moved it to componentDidMount, which is not called on the server.

isDataReady checks if the data has been already fetched (current implementation is not so important, and might be replaced). If the data is available, initialize with a preloaded state, otherwise with an empty state.

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions