validate transitions in react example