configureUrlQuery(config)
This function configures the singleton instance of React URL Query. The available options to configure are:
history(Object): Must be provided unless using React Router v4. This object should provide two functions:push(location)andreplace(location)that update the URL based on thelocationprovided.addUrlChangeHandlers(Boolean): If true, adds generated URL change handlers when usingaddUrlPropswith aurlPropsQueryConfig. Defaults totrue.addRouterParams(Boolean): If true, lifts values fromprops.paramsprovided by React Router to directpropswhen usingaddUrlProps. Defaults totrue.changeHandlerName(Function): Specifies how change handler names are generated whenaddUrlChangeHandlersis set totrue. By default, mapspropNametoonChangePropName.readLocationFromStore(Function): Reads inlocationfrom the Redux store if available and passes it to the reducer inurlQueryMiddleware. This property is only used when the middleware is added to Redux, as in this example. Defaults to reading fromstate.routing.locationBeforeTransitions, the standard location for react-router-redux.
Arguments
options(Object): The options to update in the configuration.
Returns
(void): It does not return anything.
Remarks
- If you are using React Router v4, instead of configuring the
historyoption here, useRouterToUrlQuery. All other options can still be configured normally.
Examples
import { browserHistory } from 'react-router'; // v2
configureUrlQuery({
history: browserHistory,
addRouterParams: false,
});