DEV Community

loading...

A Single Slash

szam profile image Samuel Grasse-Haroldsen ・1 min read

A Single Slash /

Just spent an hour trying to figure out what was going wrong in my routing. It was a forward slash. A forward slash.
Before:

<Route exact path="stacks/:id" component={props => <Quiz {...props} />} />
Enter fullscreen mode Exit fullscreen mode

After:

<Route exact path="/stacks/:id" component={props => <Quiz {...props} />} />
Enter fullscreen mode Exit fullscreen mode

See the difference?
Stitch Pulling His Eyelids
What tiny mistakes have slowed you way down?

Discussion

pic
Editor guide