I'm studying react nowadays. I found that programmers usually use component property when routing in react. So, for route a component named Menu, they write code like
<Route exact path='/menu' component={ Menu } />
rather than
<Route exact path='/menu'> <Menu /> </Route>
I think the second way is much more convenient when giving props to Menu component. So my question is, what is the benefit of writing code as the first way?
Thank you.