← 返回 rippling 的题目列表Frontend Mock API UI Implementation
类型:online_judge
Please implement a user interface (UI) that interacts with the provided mock API. Requirements are as follows:
Use JavaScript and a front-end framework (e.g., React) to build the UI.
The API requires the usage of nextToken for pagination requests.
Handle asynchronous API calls and display the returned data in the UI.
Ensure good user experience in the UI, including loading states and error handling.
Assume the mock API returns data in the following format:
{
"items": [{ "name": "Item1" }, { "name": "Item2" }, ...],
"nextToken": "abc123"
}
Please provide a complete code implementation and test cases.