docs
evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
Build a React component that captures and displays all raw user input as they type into a numeric input field, before any parsing or formatting occurs.
Create a component called InputTracker that:
. and -)The component should accept these props:
initialValue: Optional starting valuemin: Minimum allowed valuemax: Maximum allowed valueThe validation checks should only test the format of the raw string, not whether it's within min/max range.
import React from 'react';
export interface InputHistoryEntry {
rawInput: string;
isValid: boolean;
sequenceNumber: number;
}
export interface InputTrackerProps {
initialValue?: number | string;
min?: number;
max?: number;
}
export const InputTracker: React.FC<InputTrackerProps>;Provides numeric input functionality with raw input capture.
React framework for building the component.