Update state.md

make code example consistent with surrounding context