-
Notifications
You must be signed in to change notification settings - Fork 380
Closed
Labels
Description
Currently in TestReactRouterRedirect
a redirect is demonstrated and the state is stubbed.
export default class TestReactRouterRedirect extends BaseComponent {
static checkAuth(nextState, replace) {
// Hard code this to demonstrate the effect
const notAuthorized = true;
if (notAuthorized) {
replace({ pathname: '/', state: { redirectFrom: nextState.location.pathname } });
}
}
What would be the react-on-rails way to access/get state at this point? I've tried a few approaches with no success. Thanks.