Skip to content

visontail/react-interview

Repository files navigation

React interview task

The insturctions where the following:

  • Renders a list of items.
  • Each item in the list can be "selected" by clicking on it and "unselected" by clicking on it again.
  • A "selected" item becomes "unselected" 1 second after clicking on it.
  • Multiple items can be selected at once.
  • The component should not re-render items that have not changed their selection state.
  • The list of items will be passed in a prop.
  • The list of items can have arbitrary length and the items can be strings, numbers, Dates or React elements.
    • Dates should be formatted.
  • Write this component in TypeScript, using function components and hooks.
    • Pay attention to possible performance optimizations.