Skip to content
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

URL params invisible to react-router-redux in clientOnly mode #102

Open
nadyja opened this issue Jan 19, 2017 · 0 comments
Open

URL params invisible to react-router-redux in clientOnly mode #102

nadyja opened this issue Jan 19, 2017 · 0 comments

Comments

@nadyja
Copy link

nadyja commented Jan 19, 2017

I recently started using redux-auth in clientOnly mode. I had to update from v0.0.2 to 0.0.3 for the login status to persist and now react-redux-router stopped recognizing the URL params.

For example
If I go to /signin?next=dashboard the route configuration <Route path="signin" component={AuthenticationSignIn} /> doesn’t match it anymore and the page gets 404 (worked fine in 0.0.2)

In the redux store the URL doesn't get divided into pathname and search

state: {
	...
	routing: {
		locationBeforeTransitions: {
		pathname:'/signin?next=dashboard',
		search:'',
		hash:'',
		state:null,
		action:'REPLACE',
		key:'dyvyyn',
		query:{},
		
		$searchBase: {
			search:'',
			searchBase:''
			}
		}
	}
}

My configuration:

const client = new ApiClient(apiHost);
const _browserHistory = useScroll(() => browserHistory)();
const store = createStore(_browserHistory, client, {});
const history = syncHistoryWithStore(_browserHistory, store);

store.dispatch(configure(
  { apiUrl: apiHost },
  { clientOnly: true }
)).then(() => {
  ReactDOM.render(
    <Provider store={store} key="provider">
      {createComponent()}
    </Provider>,
    dest
  );
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant