Hello everyone,
VueJs dev here. I’m currently building a small recipes app where I want to sharpen my React knowledge / skills and I am in need of help. I was wondering if there was a way to redirect to a route outside of a component (without useNavigate or <Redirect />).
I would like to use the redirect in my axios interceptor and in some redux thunk functions (ex: after successfull login and signup). I’ve seen online that some people use the createBrowserHistory method but I’m not sure if this way is outdated. Is there a preferred (opinionated) way of doing this? . Thanks!
Note: I am using react router 6
submitted by /u/aenss
[link] [comments]