As long memoize-state know what it will compare, it is possible to use that knowledge to create `areStatesEqual` and speed up everything a bit.