A reference for translating between the Relay Classic and Relay Modern APIs.
Classic: <RelayRootContainer>
Modern: <QueryRenderer>
Classic: Relay.createContainer
Modern: createFragmentContainer
Classic: Relay.createContainer
Modern createRefetchContainer
Classic: Relay.createContainer
Modern: createPaginationContainer
Classic: this.props.relay.setVariable({foo: bar}...)
Modern: this.props.relay.refetch({foo: bar}...
in a Refetch Container
Classic: this.props.relay.setVariable({count: prevCount + pageSize}...)
Modern this.props.relay.loadMore(pageSize...)
in a Pagination Container
Classic: this.props.relay.forceFetch()
Modern: this.props.relay.refetchConnection(...)
in a Pagination Container
or: this.props.relay.refetch({}, {}, callback, {force: true})
in a Refetch Container
Classic: this.props.relay.commitUpdate(mutation...)
Modern: commitMutation(this.props.relay.environment, {mutation...})
© 2013–present Facebook Inc.
Licensed under the BSD License.
https://facebook.github.io/relay/docs/api-cheatsheet.html