Junior — Senior
UI component for simulating sequential HTTP requests with user-defined parameters
livecode
Task condition
The example implements a simple React component that displays a form with input fields for the URL address, number of requests, average response time, and the number of requests already made. The "Start" button currently does not have a handler but serves as an entry point for further logic.
import React from "react";
export function App() {
const [numOfRequests] = React.useState(10);
const [url] = React.useState("codesandbox.io");
return (
<div>
<div>
<label>URL</label>
<input value={url} />
</div>
<div>
<label>Number of requests</label>
<input value={numOfRequests} />
</div>
<div>
<label>Avg response time</label>
<input />
</div>
<div>
<label>Requests made</label>
<input />
</div>
<button>Start</button>
</div>
);
}