Is there a way to use useNavigate() hook outside functional component in react-router v6? I'm trying to use navigate(url) inside a saga function. I know in v4 we could do something like this:
const history = createBrowserHistory();
function* sagaFunc(){
history.push(url)
}