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

16.SkillsForJobs

Write a component named SkillsForJob that receives a list of jobs as prop:

type Job: {
    id: string;
    name: string;
    skillsNeeded: string[];
}

The component should display a list of all unique skills across all jobs. Users can select or deselect skills, and based on their selection, show the jobs that match at least one selected skill.

The matching jobs should be rendered inside a list, each job on it's own list item. Put this list in a section with the heading: Possible jobs: as in the demo below.

If no jobs match the current checkbox selection, display the message "No matching jobs".

Example 1

Input

No input props

Demo

Open demo in new window

You'll see test results here!