Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix createSelectorCreator for reselect v4
reselect's createSelectorCreator will use the passed memoization function for wrapping the result function, but will also (as of v4.0.0) use it to memoize the actual selector. Unfortunately our specialized mapped memoization functions won't work for general purpose memoization, so this breaks. At the time of writing (reselect v4.0.0) the memoizeOptions passed to createSelectorCreator are _only_ passed through to the memoize that wraps the result func. We can use this param to determine whether to use our special memoize, or to use reselect's defaultMemoize. In this way we make createSelectorCreator use our mapped memoize for wrapping the result func and defaultMemoize for wrapping the selector. It sucks that we're relying on an implementation detail inside reselect but I'll be back to fix this code again whenever it breaks :) Closes #13
- Loading branch information