← 返回 ramp 的题目列表Fetch and Display Hidden Flag with React
类型:online_judge
Task Description
In a provided React + TypeScript + Mocha environment, complete the following tasks:
Retrieve a hidden string (Flag) from the DOM or given URL.
Load the string in a React component via an HTTP request.
Display the string character by character using a Typewriter effect.
Ensure the animation occurs only once.
Write Mocha + TS tests to validate the implementation.
The task requires an accurate understanding of React Hooks, proper DOM traversal, attribute matching, handling differences between browser and Node environments, and testing framework compatibility. It also tests debugging and engineering detail handling skills. The task is comprehensive and focuses on implementation accuracy and completeness.
Example
Input
HTML setup with '/get-flag-url' returning 'hiddenFlag'