PacktPublishing / Full-Stack-React-Projects-Second-Edition

Full-Stack React Projects - Second Edition, published by Packt
MIT License
461 stars 538 forks source link

a small mistake about parameters in PrivateRoute.js #93

Closed akaigyouhou closed 3 years ago

akaigyouhou commented 3 years ago

I suggest that you should write "{ component: component }" instead of "{ component: Component }". Otherwise the "component" you get from "<"PrivateRouter component={...} />" will be overwritten by "Component" from react. I just find it by console.log(component);

akaigyouhou commented 3 years ago

I found it very weird after changing the Component to component. I always got waring of "no render in Component". Any one has any idea?