React-navigation, how to define required params?

Viewed 181

I'm using react-navigation to define the routes of my application, I have them declared as such: ``` const AppStack = StackNavigator( {

Home: {
  path: '/',
  screen: Root,
},
Room: {
  path: '/room/:id',
  screen: Room,
},

As you can see I'm interesting in declaring one of the routes (/room) with a mandatory id param, but I'm not really sure if this makes it mandatory/required?

Is there a way to declare the necessary params for the route?

0 Answers
Related