100 JS Functions

Beginner

1. CurrentYear

2. SimpleCounter

3. DoubleNumber

4. CreateColor

5. DynamicGrid

6. DynamicPictureSize

7. RandomButton

8. TabbedNavigation

9. MathOperator

10. GuessTheNumber

11. BetweenDates

12. Reactions

13. FeedTheBunny

14. Countdown

15. ClickFast

16. SkillsForJobs

17. UsersTabel

18. TodoList

19. UserSearch

20. SpendingInfo

19.UserSearch

Write a component named UserSearch that receives a list of users as prop:

type User = {
  id: string;
  firstName: string;
  lastName: string;
};

The component will render a text input, and the full list of users underneath.

When we type into the input, we'll show only the users for which  firstName or lastName includes the text in the input. If we remove all text from the input, show all users. If we found no user, add a message No users found.

Example 1

Input

No input props

Demo

Open demo in new window

You'll see test results here!