标签: xstate-react

XState TypeScript - useInterprete 服务

我正在构建一个带有 UI 并TypeScript与UIxState相结合的登录机器React

我的机器是:

import { LoginResponse } from 'async/authentication/responseModel';
import Data from 'data';
import { AUTH_TOKEN } from 'Machines/authentication/constants';
import services from 'services';
import { assign, DoneInvokeEvent, Interpreter, Machine, MachineConfig, State } from 'xstate';

export type AutomataContext = {
  authentication: {
    oldToken: {
      exists: boolean;
      token: string;
    };
    token: string;
  };
  login: {
    email: string;
    password: string;
  };
};

export interface AutomataStatesSchema {
  states: {
    SEARCHING_EXISTING_AUTH_TOKEN: {};
    VERIFYING_EXISTING_TOKEN: {};
    LOGIN_VIEW: {};
    AUTHENTICATING: {}; …
Run Code Online (Sandbox Code Playgroud)

typescript reactjs xstate xstate-react

0
推荐指数
1
解决办法
1764
查看次数

标签 统计

reactjs ×1

typescript ×1

xstate ×1

xstate-react ×1