--- id: common-mistakes title: Common Mistakes sidebar_label: Common Mistakes hide_title: true description: Common Mistakes --- import { InternalLinks } from '@site/src/components/InternalLinks' # Common Mistakes A somewhat common mistake is to write an that extracts a value or does some derivation, and a that just returns its result: ```ts // ❌ BROKEN: this will not memoize correctly, and does nothing useful! const brokenSelector = createSelector( [(state: RootState) => state.todos], todos => todos ) ``` Any that just returns its inputs is incorrect! The should always have the transformation logic. Similarly: ```ts // ❌ BROKEN: this will not memoize correctly! const brokenSelector = createSelector( [(state: RootState) => state], state => state.todos ) ```