react-native-simple-router icon indicating copy to clipboard operation
react-native-simple-router copied to clipboard

RightCorner doesn't work in firstRoute

Open ggarnier opened this issue 8 years ago • 0 comments

Hello. I'm trying to add a component in the right corner, but it doesn't appear in the first route, only in the other routes. Here's a sample of my code:

class App extends Component {
  const firstRoute = {
    name: "My app",
    component: MainPage
  }

  render() {
    return (
      <Router
        firstRoute={firstRoute}
        rightCorner={Button}
      />
    )
  }
}

class Button extends Component {
  render() {
    return (
      <Image
        source={require('./images/button.png')}
        style={{width: 30, height: 30}}
      />
    )
  }
}

ggarnier avatar Feb 15 '17 21:02 ggarnier