Add support for route handling without requiring a `Component`
See original GitHub issueAt the moment, in order to handle navigation to a particular route by forwarding to one of several views depending on a certain condition, one needs to create a dummy Component
and either annotate that with @Route
, or use RouteConfiguration.setRoute(...)
which also requires a Class<? extends Component>
. Since there is no actual view that should be shown for this route, it shouldn’t be necessary to create a dummy component class which will also get instantiated at runtime.
Consider support for registering a route with custom navigation handling that doesn’t require a UI component.
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
How To Handle Routing in React Apps with React Router
In this tutorial, you'll install and configure React Router, build a set of routes, and connect to them using the <Link> component.
Read more >Routing - Express.js
Express Route Tester is a handy tool for testing basic Express routes, although it does not support pattern matching. Query strings are not...
Read more >Express Tutorial Part 4: Routes and controllers - MDN Web Docs
In this tutorial we'll set up routes (URL handling code) with "dummy" ... and then adds a couple of routes to it using...
Read more >React Router with optional path parameter - Stack Overflow
My question is, can we declare it in one route? If I add only the second row then the route without the parameter...
Read more >How React Hooks can replace React Router - LogRocket Blog
import { Router, Route, Switch } from "react-router";. However, you should not install it directly into your project like that. If you're ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
On a conceptual level, what this might mean is that there are actions registered for different URL patterns. There are terminal actions such as rendering a component inside a parent layout, showing an error or doing an external redirect, as well as intermediate actions that just conditionally delegate to some other action or URL.
That is indeed my use case: handling A URL and, depending on user’s permissions, forward/redirect to a specific route. Using a dummy Component works, but feels like a workaround.
Op ma 10 mei 2021 08:25 schreef Pekka Hyvönen @.***>: