# 新冠追踪器

¥Covid Tracker

此示例显示了使用 XState 和 React 过滤的国家/地区有关 COVID-19 大流行的当前统计数据。它包含了:

¥This example shows a current statistics about COVID-19 pandemic filtered by countries using XState and React. It contains:

  • covidMachine - 处理国家/地区选择,包括负责获取全球所有国家/地区列表的 "sub-state"

    ¥covidMachine - handles country selection, including a "sub-state" responsible for fetching the list of all countries across the globe

  • covidDataMachine - 根据所选国家/地区处理获取特定统计数据(包括 confirmeddeathsrecovered 案例)

    ¥covidDataMachine - handles fetching specific statistics (including confirmed, deaths, recovered cases) based on selected country

负责渲染数据的两个子组件 <Indicator /><Chart />,使用来自 MachineProvider 上下文提供者的服务

¥The two child components <Indicator /> and <Chart /> that responsibles of rendering data, consumes the service from the MachineProvider context provider