(currPath, newState, oldState, action)
| 356 | } |
| 357 | |
| 358 | export const getDepChange = (currPath, newState, oldState, action) => { |
| 359 | if(action.depChange) { |
| 360 | newState = action.depChange(currPath, newState, { |
| 361 | type: action.type, |
| 362 | path: action.path, |
| 363 | value: action.value, |
| 364 | oldState: _.cloneDeep(oldState), |
| 365 | listener: action.listener, |
| 366 | }); |
| 367 | } |
| 368 | return newState; |
| 369 | }; |
| 370 | |
| 371 | // It will help us generating the flat path, and it will return the same |
| 372 | // object for the same path, which will help with the React componet rendering, |
no test coverage detected