question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

.getCurrentRoute() returns :virtualSegment_1/:virtualSegment_2/:virtualSegment_3

See original GitHub issue

Description

Using LuigiClient.linkManager().getCurrentRoute() returns /projects/project1/documentation/:virtualSegment_1/:virtualSegment_2/:virtualSegment_3 instead of the real values as described in the first example #2724

LuigiClient version 1.23.1

Expected result

As described in #2724 LuigiClient.linkManager().getCurrentRoute() - full route of luigi main app, e.g. /projects/project1/documentation/Product/Contact/Teams

Actual result

/projects/project1/documentation/:virtualSegment_1/:virtualSegment_2/:virtualSegment_3

Steps to reproduce

In a page with virtual segments call: LuigiClient.linkManager().getCurrentRoute()

Troubleshooting

LuigiClient.linkManager().fromVirtualTreeRoot().getCurrentRoute() also return something strange: /projects/project1/documentation instead of /Product/Contact/Teams

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ndricimrrcommented, Jun 24, 2022

Hi @DenisDuev , I believe we have spotted this issue and is currently being handled in this PR.

0reactions
DenisDuevcommented, Aug 11, 2022

Sorry, the feature is working as expected. The problem was on my side 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

getCurrentRoute() does not work on nested independant ...
current.getCurrentRoute() would return the current route of the nested navigator, not undefined.
Read more >
How to get current route name in react-navigation?
For react-navigation v5: import { useRoute } from '@react-navigation/native'; const route = useRoute(); console.log(route.name);.
Read more >
Track the Current Route in React Navigation V5 Outside Of a ...
This solution allows us to track our current route in our main app state context! React Navigation V5 Outside of a Screen. The...
Read more >
NavigationContainer | React Navigation
The getCurrentRoute method returns the route object for the currently focused screen in the whole navigation tree: const route = navigationRef.
Read more >
How to get current route in Next.js ? - GeeksforGeeks
Method 1: Using useRouter() Method: In NextJs we can easily get the value of the current route using the useRouter() function.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found