Search code examples
reactjsreselect

React reselect doesn’t work. There is no recalculation


defaultState: {results: {}} After api action results is populated, but reselect doesn’t recalculate result.

const selector = createSelector([selectors.getResults, selectors.getYear], (results, year) => ...);


Solution

  • Are you sure that the api action results in a completely new state object? If it just modifies the existing one, the caching kicks in, and you get previous results.