Does anyone know why you will call the component in this way. () => <Component/>
inside the route
enter image description here
If you wanna pass new props (eg. isAuth
below example) or access props from React Router (eg. history
, location
, match
)
<Route component={({history, location, match}) => <Component isAuth={isAuth} />} />