Unknown model· unknown
from ShareGPT 90K (shared ChatGPT conversations)
I need to write a typescript react program according to the folowing specification I…
- User
I need to write a typescript react program according to the folowing specification I have a list of asynchronous steps that I need to execute. Each step consists of one or more jobs. Here are type definitions: type Step = { name: string; tasks: Task[] }
type Task = { run: () => Promise }
Each task can be in the following states: not started, in progress, finished, failed Each step is an aggregation of its tasks states. write a react program that will take an array of steps, execute all of their tasks, while rendering the aggregated status of each step as an html list. I need the code only
- Assistant
Here's an example of how you can write a React program that meets the specified requirements:
code