News for hackers. Stuff that matters.
Re:React Router v4 FAQ by bostonvaulter2 on Friday September 16, 2016 @01:23PM (#12515635)
One reason to go with components over a switch statement is so you can render a specific component on all '/about' pages along with an additional specific component on all '/about/team' pages. With a switch statement you can only match a specific branch.
Re:React Router v4 FAQ by kfinley on Friday September 16, 2016 @04:24PM (#12517073)
You can still do nesting within a case, or add another case 'about-team': and add another {var} to your component. That's essentially what RR would do. React Router approach is probably a little cleaner, however.