Skip to content

Relay renderer adopted to work with react-native-router-flux library.

License

Notifications You must be signed in to change notification settings

r0b1n/rnrf-relay-renderer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This library still under development. Use it at your own risk!

rnrf-relay-renderer

Relay renderer adopted to work with react-native-router-flux library.

To Be Done

  • Move Relay renderer from example in ths repo as module.
  • Add tests
  • Rewrite example to use this module
  • Release it on npm.

How to use it

First of all, install it with npm:

npm install rnrf-relay-renderer --save

Then you will be able to pass it to the react-native-router-flux scene definition.

// importing Renderer from library
import RelayRenderer from 'rnrf-relay-renderer'

// then we include it to `wrapBy` option. Note function calling
// we can per-configure Renderer here. See API section.
<Router createReducer={reducerCreate} wrapBy={RelayRenderer()}>
  <Scene key="root">
    <Scene
      key="Countries"
      component={CountriesListScreen}
      queries={{viewer: () => Relay.QL`query { viewer } `,}}
    />
          
    <Scene
      key="Country"
      component={CountryInfoScreen}
      queries={{viewer: () => Relay.QL`query { viewer } `,}}
    />
    
    <Scene
      key="City"
      component={CityInfoScreen}
      queries={{viewer: () => Relay.QL`query { viewer } `,}}
    />
  </Scene>
</Router>

API

to be done

About

Relay renderer adopted to work with react-native-router-flux library.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •