DEV Community

Discussion on: Protected Routes with React Function Components

Collapse
 
mabradbirney profile image
maBradBirney • Edited

What a wonderful guide!
There were a couple things that caught me while following along:

  1. You misspelled "components" in "import Unauthorized from './comoponents/Unauthorized';"
  2. Also it seems like you don't need the prop "handleLogin" in the Route component for "<Route exact path='/' handleLogin={handleLogin} render={..." unless it's there for some reason I'm unaware of.

Thank you so much for this article though! It was very helpful for me!