I am new to Redux and I have been reading quite good stuff around it, including memoization technique (especially with reselect). I have a question though and I struggle to find a proper answer. If we add memoization for every single selector (assuming we have a lot), even the simple getters, will it cause performance issues (due to memoized data under the hood maybe?)? Memoization for complex selectors is obviously beneficial as it prevents recomputing if not needed. But I find memoization for simple selectors beneficial as well, to avoid useless rerender.
In fact, I use useSelector hook and the doc states:
When an action is dispatched, useSelector() will do a reference comparison of the previous selector result value and the current result value. If they are different, the component will be forced to re-render. If they are the same, the component will not re-render.
So even for a selector returning the same primitive value (say an int), If i am not wrong, the useSelector should always make the component rerender (even if the selector always returns the same value).
If what I am saying is ture, memoizing even simple getters is usefull for that matter, but can overusing it cause other performance issues?
Thanks for helping