-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Description
When load the initial tab the "viewer" prop is populated correctly but if I switch to another tab I get a "viewer is undefined" error.
const scenes = Actions.create(
<Scene key="main">
<Scene key="tabbar" hideTabBar={false} tabs={true} >
<Scene key="Profile" component={ProfilePage} initial={true} icon={TabIcon} iconLabel="ios-paper" title="Profile" />
<Scene key="NewsFeed" component={NewsFeedPage} icon={TabIcon} iconLabel="ios-home" title="News Feed" />
</Scene>
</Scene>
);
export default class SampleApp extends Component {
render() {
return (
<Router scenes={scenes} {...this.props} sceneStyle={styles.pageViewStyle} />
);
}
}
export default Relay.createContainer(SampleApp, {
fragments: {
viewer: variables => Relay.QL`
fragment on Viewer {
id
${NewsFeedPage.getFragment('viewer')}
${ProfilePage.getFragment('viewer')}
}
`,
},
});
Metadata
Metadata
Assignees
Labels
No labels