Added saving app state to localStorage