-
Notifications
You must be signed in to change notification settings - Fork 0
Implement URL based ticket loading #17
Comments
Found that react-router may result in semi-major application architecture changes needing to be made. Since the rendering of blocks of JSX is dependent upon routes, it may make sense to move forward with the selection of queue table items to redirect the app to an appropriate route. That route would then trigger any necessary API calls or backpropagation of information to the app. The resulting architecture change would mean that many of the current component props may need to change. For a simple start that utilizes a global list of items see this video. |
Documenting the various React-Routers:
import {BrowserRouter as Router, Route} from "react-router-dom";
<Router>
<Route path="/" render={() => (
<p>Root content</p>
)}/>
<Route path="/first" render={() => (
<p>First item (Root should be above me, url should be /first)</p>
)}/>
</Router>
import {HashRouter as Router, Route} from "react-router-dom";
<Router>
<Route path="/" render={() => (
<p>Root content</p>
)}/>
<Route path="/first" render={() => (
<p>First item (Root should be above me, url should be #/first)</p>
)}/>
</Router>
import {MemoryRouter as Router, Route, Link} from "react-router-dom";
<Router>
<Route path="/" render={() => (
<p>Root content</p>
)}/>
<Link to="/first">First</Link>
<Route path="/first" render={() => (
<p>First item (Root should be above me, url should be unchanged)</p>
)}/>
</Router>
|
Moving forward architecture changes should ensure that the content within the box surrounding Items is the only area affected by the Router so that it will still mount the surrounding box initially. Also Ensure that any changes made to the URL via clicking rows in the item table are made to the browser history and are compatible with the back button. |
Resolved here |
webqueue2 currently have no way to go straight to an item from a URL. This must be done by loading the page, finding the item and selecting it. This has several drawbacks:
Using react-router all of this functionality can be achieved allowing for getting an item by something like:
webqueue2.com/me/22 --> the ME 22 ItemView
The text was updated successfully, but these errors were encountered: