Need help with relay-sink?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

127 Stars 4 Forks 13 Commits 1 Opened issues


Use Relay to fetch and store data outside of a React component

Services available


Need anything else?

Contributors list

# 44
12 commits


build status npm version


import { createSink } from 'relay-sink';

const TyrionSink = createSink({ // Normal Relay Container configuration fragments: { tyrion: () => Relay.QL fragment on Character { name, house } } });

// A sink is a Relay Container. Compose with parent Relay containers like // normal. Note that this.props.tyrion and fragments.tyrion below are not // the same value — the former points to a value inside Relay's global store, // while the latter is the actual unwrapped data. { expect('Tyrion'); expect('Lannister');

// Do whatever you want with the data — e.g. dispatch it to a Flux store store.dispatch({ type: UPDATE_TYRION, payload: fragments.tyrion }); }}/>

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.