erikras / erikras/react-redux-universal-hot-example

How to get querystring values in Action Files

Open
#1,295 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
12.1k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.