react-relay-redux
Redux integration for Relay
Overview
react-relay-redux
lets you listen and respond to Relay
queries and mutations using Redux actions and reducers.
Install
$ npm install --save react-relay-redux
Usage
RegisterRelayDispatcher
react-relay-redux
exports a RelayNetworkDispatch
function that
takes your Relay environment and a dispatch
function for your
Redux store.
/* register a network subscriber */ /* then pass it to your renderer or root container */<RelayRenderer environment=RelayStore ...
RelayReduxActions
You can import and use the following actions:
RELAY_QUERY
- when a Relay query is issuedRELAY_QUERY_SUCCESS
- when a Relay query is successfulRELAY_MUTATION
- when a Relay mutation is issuedRELAY_MUTATION_SUCCESS
- when a Relay mutation is successful
Coming Soon
RELAY_{QUERY,MUTATION}_FAILURE
support