Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React Router integration. Add log of previous route. #94

Open
CyberDoge opened this issue Jan 16, 2023 · 4 comments
Open

React Router integration. Add log of previous route. #94

CyberDoge opened this issue Jan 16, 2023 · 4 comments
Labels
feature Request a new feature improvement Request a change of an existing feature triage/needs more info

Comments

@CyberDoge
Copy link

CyberDoge commented Jan 16, 2023

Description

Current version of React Router logs only destination of route. It would be useful if previous route also was logged.
Example of an event:

{
  "events": [
    {
      "name": "routeChange",
      "domain": "browser",
      "attributes": {
        "url": "http://localhost:3000/lk/personal",
        "route": "/lk/personal",
        "from": "/index"
      },
      "timestamp": "2023-01-16T09:02:53.416Z"
    }
  ]
}
@CyberDoge CyberDoge added the feature Request a new feature label Jan 16, 2023
@bfmatei
Copy link
Collaborator

bfmatei commented Jan 17, 2023

Hey @CyberDoge !

Before working on this, can you provide a little bit of context why this is needed?

The previous URL/route can be obtained by checking the previous routeChange event for the current session ID.

@CyberDoge
Copy link
Author

Hello, i just wanted to log how a potential user would be redirected to 404 page

@eskirk
Copy link
Collaborator

eskirk commented Aug 14, 2023

@bfmatei has this been implemented already?

@codecapitano codecapitano added the improvement Request a change of an existing feature label Feb 16, 2024
@codecapitano
Copy link
Collaborator

codecapitano commented Feb 16, 2024

@eskirk

Double checked.
Is implemented for React Router V6 but not for V5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Request a new feature improvement Request a change of an existing feature triage/needs more info
Projects
None yet
Development

No branches or pull requests

4 participants