Skip to main content

React Coding Tasks

You have at most 48 hours to complete the following challenges.

Fantasy Football XI

create a fantasy fooballer's list application using function-based components and the useState hook.

Requirements:

  1. Create a component called "FantasyList" that renders a form with a text input for the player name, dropdown list of positions and a submit button.
  2. When the form is submitted, use the useState hook to add the inputted footballer to an array of footballers.
  3. Display the list of footballers in the component, each footballer should have a button to delete the player.
  4. Add a button to clear all the footballers from the list.
  5. Style the application using CSS.

This assignment will help you practice using function-based components, forms and events, state, and basic styling in React.