Open Bogdaan opened 8 years ago
agreed. i'm looking into the same thing.
@jshultz as a alternative, you can pass express query string in route state:
await Router.dispatch({
path: req.path,
query: req.query,
}, (state, component) => {
...
There's an example here that might be useful: https://github.com/kriasoft/react-starter-kit/blob/master/docs/recipes/how-to-implement-routing.md#step-3-parameterized-routes
on('/products/:id', async (req) => {
const data = await http.get(`/api/products/${req.params.id}`);
return <Layout><ProductInfo {...data} /></Layout>;
});
@aaronkw how it will help process routes with query string (like ?form[a]=1&form[b]=1&form[c]=4)?
@Bogdaan thanks for the advice
To clarify, here is the example with the react starter kit : https://github.com/kriasoft/react-starter-kit/pull/355
For example i have route "/search" and 100 parameters in app logic, how to pass this in "state"? Just for process routes like:
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.