ecomfe / standard-redux-shape

A library to help standardize your redux state shape
MIT License
47 stars 6 forks source link

Put params out of response #9

Closed otakustay closed 6 years ago

otakustay commented 6 years ago

Currently SRS makes a structure like:

{
  "{params}": {
    "pendingMutex": 0,
    "response": {
      "arrivedAt": 1234567,
      "params": {},
      "data": {}
    }
  }
}

The problem is we can only access params after response is arrived, or we could only get params by JSON.parse(keyOfQuery) which is really silly

We should put params out of response as a first level key under query object