-
Notifications
You must be signed in to change notification settings - Fork 241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
React-router v6 #305
Comments
Also wondering if this is v6 compatible |
Hi, unfortunately I'm not actively maintaining this repo any more. Looking at the react router v6 docs, it looks like there are some breaking changes so I wouldn't expect this to work without some modifications. |
I'm starting a fresh project and tried this and it seems to be working fine (with redux-first-history). What are the breaking changes in react-router v6 which affects redux-auth-wrapper? import { connectedReduxRedirect } from 'redux-auth-wrapper/history4/redirect';
import { replace } from 'redux-first-history';
import LoadingPage from 'components/LoadingPage';
function redirectUser(state) {
if (state.global.currentUser.id) {
return '/test';
}
return '/login';
}
export const isAuthenticated = connectedReduxRedirect({
redirectPath: state => redirectUser(state),
authenticatedSelector: state => !!state.global.currentUser.id,
authenticatingSelector: state => !state.global.checkedMeAuth,
allowRedirectBack: false,
AuthenticatingComponent: LoadingPage,
wrapperDisplayName: 'IsAuthenticated',
redirectAction: replace,
}); |
That's good to hear! Do you know what version of history you are getting as a transitive dependency? |
Sure. It's history 5.3.0. |
Based on #267 have you seen the query param populated properly? |
Seems to be working fine for me (with |
in the react-router-dom official website said:
so are you sure it's compatible with v6? |
Just to chime in, in case it's helpful to anyone: My app was upgraded to |
Hello,
Is this react-router v6 compatible?
The text was updated successfully, but these errors were encountered: