Run the React Router v4 Examples with Create React App

Joe Maddalone
InstructorJoe Maddalone

Share this video with your friends

Send Tweet

React Router v4 doesn’t require a lot of configuration to run. The core examples will run out of the box with Create React App. In this lesson, you will create an application and get React Router v4 up and running.

note: in this video react-router-dom is installed with the --save-dev flag. This is not required and may cause issues if used. Simply install it with npm install react-router-dom and it will function as expected.

Caden Albaugh
Caden Albaugh
~ 4 years ago

Hey Joe! Love your personal site, simple design with great effects! Had to laugh when I opened to dev tools. Also great course so far!

Quick questions:

  1. What is your sublime plugin/theme that gives you all the nice syntax highlighting along with the icons along side the file names?

  2. Why no need for the semi-colons in the javascript?

Thanks for taking the time to answer these simple queries.

Joe Maddalone
Joe Maddaloneinstructor
~ 4 years ago
  1. Afterglow - icons may have been something else though - will double check on that.
  2. I plead the fifth.
Markus Hubig
Markus Hubig
~ 4 years ago

Hey Joe, just a quick question: Why are you installing the router with --save-dev?

Joe Maddalone
Joe Maddaloneinstructor
~ 4 years ago

just force of habit - could've just as easily have been --save.

Mickey
Mickey
~ 3 years ago

Hi Joe, Like your course and pace of delivery. I had the same question, would we not need the router to be installed with --save as it will be needed in prod as well, and not in dev?

Shripada Hebbar
Shripada Hebbar
~ 3 years ago

I think we should not install react-router-dom this with --save-dev. That is wrong. Since it has to be the part of our app, we should just install it as just dependency (without --save-dev)

Rootul
Rootul
~ 2 years ago

Agreed with Shripada. This video is misleading and should be corrected to indicate that react-router-dom should be added to the dependencies and not devDependencies.

Joel Hooks
Joel Hooks
~ 2 years ago

Hey there, thanks for pointing out this error! It should be very useful for other learners.

For anybody else watching, you don't need --save-dev and should not use it. It's an error.