Simplifying State Management - chapter 2 example 1