get-in-app-state helper function.