Package Exports
- react-relay
- react-relay/ReactRelayContext
- react-relay/ReactRelayContext.js
- react-relay/hooks
- react-relay/hooks.js
- react-relay/index.js
- react-relay/legacy
- react-relay/legacy.js
- react-relay/lib/ReactRelayQueryFetcher
- react-relay/lib/ReactRelayQueryFetcher.js
- react-relay/lib/ReactRelayTypes
- react-relay/lib/ReactRelayTypes.js
- react-relay/lib/RelayContext
- react-relay/lib/RelayContext.js
- react-relay/lib/relay-hooks/MatchContainer
- react-relay/lib/relay-hooks/MatchContainer.js
- react-relay/lib/relay-hooks/legacy/useBlockingPaginationFragment
- react-relay/lib/relay-hooks/legacy/useBlockingPaginationFragment.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-relay) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
React APIs for Relay
This package contains a collection of React APIs: Hooks and Components that are integrated with Relay runtime.
Example:
// @flow
import type {UserComponent_user$key} from 'UserComponent_user.graphql';
const React = require('react');
const {graphql, useFragment} = require('react-relay');
type Props = {
user: UserComponent_user$key,
};
function UserComponent(props: Props) {
const data = useFragment(
graphql`
fragment UserComponent_user on User {
name
profile_picture(scale: 2) {
uri
}
}
`,
props.user,
);
return (
<>
<h1>{data.name}</h1>
<div>
<img src={data.profile_picture?.uri} />
</div>
</>
);
}
For complete API reference, visit https://relay.dev/.