Can't find sample of using "@auth0/auth0-react": "^2.2.4", with react 17.0.2 and react-routerv6.4.5

I am using “@auth0/auth0-react”: “^2.2.4”, with react 17.0.2 and react-routerv6.4.5. But I have not been able to find a sample to follow to do that. I see react 17 with react router 5 but not 6. Is it that it is impossible to use @auth0/auth0-react with those two packages? I just cannot go to react 18 at this point.
I am looking for this basic answer first before even trying to get help debugging the correct code for index.js and Auth0ProviderWithNavigate, etc..
Any help would be so appreciated. Especially if this is possible, where to find a sample?
Thanks to all,
Ginny

Hi @mkidushim, and welcome back to the Auth0 Community!

While I couldn’t find a sample app with your configuration, I’m quite sure there is no compatibility issue with the versions you want to use. React Router v6 needs React v16.8 or higher, as specified here.

What you could do is take the React 17 with Router 5 sample you mentioned and go through the migration guide for v6, you can find here.

I hope this helps you!

Sincerely,
Teodor.

Thank you so much for that info. I am now trying to use that info but I think maybe I have a more fundamental problem than I suspected. First of all, I inherited the code that was using react 8, and auth0-js. I have upgraded to react 17 and react router 6. and now use “@auth0/auth0-react”: “^2.2.4”. In trying to modify the old code, it had problems, that I now see as a bad implementation of auth0 that needed fixed while I was trying to upgrade to the new package.
I may have goofed up my code by not fully understanding all the uses and rules and maybe version rules for using things like Auth0Provider, Auth0ProviderWithNavigate, this new authorizationParams: {…
It seems I need to just clean out all the code and start over, but need the correct tutorial or lessons or docs, that are germain to my site needs. What I mean is that I need the user to be presented with the auth0 universal login page at the very start of going to my url. I dont have any page with a login button, like all the tutorials have. I just want to be able to kick off that page to login and then go back to App.js (I guess) or just my “/dashboard” page. There is no page the user may see without being logged in.
I have console logs around what I think is the correct code for LoginWithRedirect, but I never get the auth0 universal login page, and it doesn’t return an error in my catch.error.
I need help in stepping through this. Maybe what I thought was router problem is just an auth0 setup problem?
I am so sorry this is long. But I thank you for your help.