state x nodejs code example Example: xstate install npm install xstate if you are using yarn: yarn add xstate