Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
132
rated 0 times [  138] [ 6]  / answers: 1 / hits: 17690  / 9 Years ago, sat, august 15, 2015, 12:00:00

I'm building a single page application with React and Backbone and am trying to figure out best practices for handling navigation between content in the app. My app will have a sidebar with links, for example, to photos and settings. The sidebar is always present, so upon clicking settings I want the settings component to be rendered without the entire page reloading. Slack is a great example of what I'm looking for, where clicking a different channel switches the conversation content, but does not reload the entire page.



I had a few ideas on how to implement this, but i'm not sure what's best:




  1. Have a general react component (console.jsx) that accepts a urlparameter as a prop to determine which content (photos or settings) to render.



or 2. have a general react component and define a state variable that represents which content to render.



Any help would be greatly appreciated!


More From » backbone.js

 Answers
20

Have you heard about react router? Seems to be what you want.
react router


[#65405] Wednesday, August 12, 2015, 9 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
josuea

Total Points: 609
Total Questions: 121
Total Answers: 104

Location: South Georgia
Member since Fri, Nov 13, 2020
4 Years ago
josuea questions
;