React/JavaScript Authentication: Integrate with React Router 6

This JavaScript code sample demonstrates how to implement authentication in a React Single-Page Application (SPA) using the Auth0 React SDK and React Router 6.

1 Like

@dan-auth0 Seems the link doesn’t work.

1 Like

:pray: Apologies! This was meant to be a draft :sweat_smile: I was preparing a release. The page is live now! Please let me know if you have any questions about this code sample :muscle: Thanks for visiting the Auth0 Developer Hub!

2 Likes

Thanks for the update @dan-auth0.

What do you think on this ? Function Components | React TypeScript Cheatsheets

Usage of React.FC is discouraged.

I think that is a personal preference. I have never had an error with using React.FC and I like how it helps with refactoring and type-checking, It makes the code more readable to me. I think that also would depend on team styleguides and such.

1 Like