DEV Community

Cover image for A Complete Beginner's Guide to React Router (including Router Hooks)

A Complete Beginner's Guide to React Router (including Router Hooks)

Ibrahima Ndaw on February 17, 2020

Originally posted on my blog React is a JavaScript library for building user interfaces. We can also extend it to build Multi-page applications wi...
Collapse
 
supunkavinda profile image
Supun Kavinda

Hey! Nice tutorial.

By the way, any reason to use <Fragment> instead of <>?

Collapse
 
ibrahima92 profile image
Ibrahima Ndaw

I use Fragment to not confuse beginners, it's much clear than <>. Anyway, thanks for your comment.

Collapse
 
supunkavinda profile image
Supun Kavinda

Yeah, I agree with that. <Fragment> is much clearer. Thanks for the reply!

Thread Thread
 
ibrahima92 profile image
Ibrahima Ndaw

You're welcome.

Collapse
 
ctimmerman profile image
Cees Timmerman • Edited

The first code section needs: import React, { Fragment } from 'react'
They all need consistent indentation.
And make sure the other dependencies work: ./src/App.js
Line 27:6: 'FakeText' is not defined react/jsx-no-undef

Collapse
 
upen90 profile image
Upen90

This is awesome. Thanks a lot.

Collapse
 
100000multiplier profile image
multiply.today

Great tutorial thanks

Collapse
 
yudibakshi profile image
Yudi Bakshi

very detailed introduction to react router. all concepts clearly explained. Thank you so much :-)

Collapse
 
ibrahima92 profile image
Ibrahima Ndaw

Thanks for reading

Collapse
 
mefaba profile image
AW A RE

What is fragment?