Can I add some custom properties to the Route component of React Router4?

for example, I had such a Route in React Router2
< Route path= "banke-daily/:id" component= {BankeDaily} secondLevel= "schedule" thirdLevel= "banke" / >

.

now upgrading to Router4, doesn"t seem to get custom attributes like thirdLevel directly. Is there any way for me to add some custom data to the Route component and get these attributes through props in the component?

Apr.02,2021

you can try to write like this

<Route path="banke-daily/:id" render={(props) => (<BankeDaily secondLevel="schedule" thirdLevel="banke" {...props}/>)} />
Menu