A Promise-based state machine that is compatible with JSX.