Update example app with new state functionality