React Router v6 Code Posted
Chapter 12 covers how to do Routing in React using React Router v5. In the time since the book came out, React Router v6 has been released, which includes some changes to how it’s used.
I’m also working on writing a version of Chapter 12 that covers React Router 6. I’ll post that to the book’s website when it’s finished.
All the code in the book still works, as long as you use React Router v5. However, if you’d like see how the examples in Chapter 12 are written in the latest version of React Router, I’ve converted them and put them in the repository here:
https://github.com/chrisminnick/react-js-foundations/tree/main/book-code-listings
As always, let me know if you have any questions!
Download the examples, report issues, and ask/answer questions in the discussion area by visiting the book's github page. All of the code for the book is also available on codesandbox.io for you to play around with.
ReactJS Foundations is published by John Wiley and Sons, Inc and is available in paperback and eBook.