What's the difference between using render in React's Route and adding components with component?

React rookie, found that in Route, render= {() = > {component}} and component= {component} get different this.props after route jump, such as history, match and so on in component mode, but only in parent component. I don"t quite understand the usage of these two, so ask for a great solution

.
Apr.07,2021

this points to the problem. component= {component} component is mounted directly under router. render= {() = > {component}} itself is a component. The component refers to the component you define, which is equivalent to adding another layer. This is different

.
Menu