passing data to component using props route react code example
Example 1: route pass props to component
<Route
path='/dashboard'
render={(props) => (
<Dashboard {...props} isAuthed={true} />
)}
/>
Example 2: passing data in route react
<Route path="/" component={() => <Search name={this.props.name} />} />