Using reselect

    Bad

    In this above case every time otherData in the state changes both DataContainer and ResolutionContainer
    will be rendered even when the resolution in the state does not change.
    This is because the doubleRes function will always return a new resolution object with a new identity.
    If doubleRes is written with Reselect the issue goes away:
    Reselect memoizes the last result of the function and returns it when called until new arguments are passed to it.

    Good

    1. r => r.width,
    2. (width, height) => ({
    3. width: width * 2,
    4. })
    5. );