Sobes.tech
Junior — Senior

React component for displaying and searching users

livecode

Task condition

Create a basic React component that makes a request to the open API service (https://jsonplaceholder.typicode.com/users) to get a list of users and displays their names on the page. Add a search feature by name: when typing in the input field, the results should update instantly, showing only users whose names match the query.

Requirements:

  • When the component mounts, perform a GET request to the specified URL and store the received data in the state.
  • Display the list of user names as a simple list (e.g., <ul><li>...</li></ul>).
  • Implement an input field that keeps the current search query in the state.
  • Filter the array of users in real-time, comparing the entered text with each user's name field (case-insensitive).
  • When there are no matches, display the message "Nothing found".