How to log user out from outside of React component

I am using @auth0/auth0-react for auth in my react app. It works perfectly fine. However, I also need to log a user out from outside of React component. It seems react library cannot meet such requirement and after some digging, I see I could probably use one of auth0-js or auth0-spa-js to achieve what I want. But it seems i need to configure the client again the same way as I already have with @auth0/auth0-react which I don’t quite like it. Is there any other method I can take a look at?


can i use the same client inited through Auth0Provider i’ve configured for react?