erikras / react-redux-universal-hot-example

A starter boilerplate for a universal webapp using express, react, redux, webpack, and react-transform
MIT License
12.01k stars 2.5k forks source link

How to get querystring values in Action Files #1295

Open govind999 opened 7 years ago

govind999 commented 7 years ago

I have a URL as below with various query string values.

http://localhost:3000/product/?id=123&name=test

I am using your code for isomorphic application using redux, react. So i am firing action and may i know how can i get these query string values to redux action file?

export function getProductData(params) {

debug('Action Requested:' + params);

return { type: GET_PRODUCT_DATA, promise: request.get(API_URL + params.productId) } }; Because in action i am firing the API call and i need that ID from querystring value.