I just moved the application from reactand react-routerfrom the old version to react 0.15andreact-router 2.0
In the old version Links, created as follows:
<Link to='route-name' query={{ids: [1]}}>
{name}
</Link>
It built a url like /route/?ids[]=1. This will give me a component
this.props.query = {
ids: ['1']
}
After the update, the announcement Linkwas changed to:
<Link to={{pathname:`/route/`, query={ids: [1]}}}>
{name}
</Link>
Which creates URLs, such as /route/ids=1, now the router parses the request:
this.props.location.query = {
ids : '1'
}
The only way I managed to get the array is if the array in the link declaration has more than one element, although the URL does not use empty brackets in the URL.
, , , , , , .