Learn React Router 5 - by ReactTraining.com
React Router 5 is out at we have this course so you can learn all about it. The course covers basic and advanced topics. We'll be building a Firebase-looking app that has complex nested layouts and interesting problems to solve.
If you're wondering what's new in React Router 5? Not a lot except internal optimizations and fixes for React 16.x. So you could also think of this as a React Router 4 course since the API is the same. See more info on the React Router 5 release
npm install npm start
Then go to localhost:8000
Be sure to see notes on Lesson Branches below...
To view the code for a given lesson, checkout the appropriate branch name. The branch will have the finished code from that lesson.
All the branches are checked out to your local machine automatically when you do
npm install. Just do a
git branchto verify and see all branches after.
To view a branch:
git checkout [branch-name]
Branch names are minimal for easy typing:
Just so we can mimic some data and pretend it's asynchronous, there's a
src/database.json. Feel free to add more "Firebase Projects" if you want.
className. Who cares, it keeps the styling clutter out of the JS files since this is teaching material for routing.
layoutsfor highly re-usable app-wide layouts
stylesfor Sass modules
uiis where I like to put re-usable "leaf-types" of components
utilsis a catch all for React components that are more utilitarian in nature (and less UI in nature) and other general utils.
Any other folders in
/srcis a section of the site, like
/projectswhich correspond to
localhost:8000/authetc. I guess I could organize those into a
/pagesfolder, but who likes deep nesting anyways?