Frontend School

Kanban Board: Task Column Management

Machine Coding
easy

Kanban Board: Task Column Management

Easy
Frontend
React
UI
State Management
Kanban

Overview

At Uber, efficient project management is key to delivering features quickly and reliably. Kanban boards are a popular tool for visualizing work, limiting work-in-progress, and maximizing efficiency. For L3 engineers, understanding how to build interactive UI components that manage state and user input is fundamental. This problem focuses on building a core part of a Kanban board: managing tasks within a single column.

What you need to do / Task

Your goal is to implement a functional React component for a single Kanban board column. This column should allow users to view, add, and delete tasks.

  1. Display Tasks: Render a list of tasks provided as initial data within the column. Each task should display its title.
  2. Add Task: Implement functionality to add a new task to the column. This should involve an input field where the user types a task title and a button to submit it. New tasks should appear at the bottom of the list.
  3. Delete Task: Implement functionality to delete an existing task from the column. Each task should have a button (e.g., "Delete" or an "X" icon) that, when clicked, removes that specific task from the list.

UI/UX expectations

  • The component should clearly display a column title (e.g., "To Do").
  • Tasks should be rendered as individual "cards" or list items, each showing its title.
  • Below the list of tasks, there should be an input field for new task titles and an "Add Task" button.
  • Each task card should have a visible "Delete" button.
  • Basic visual separation between tasks and the add task form is expected. Minimal styling is acceptable, but the layout should be clear and functional.

Acceptance criteria

  • Initial tasks are rendered correctly on load.
  • New tasks can be added via the input field and button.
  • Added tasks display their titles correctly in the list.
  • Each task has a functional delete button.
  • Clicking a delete button removes the corresponding task from the list.
  • The input field for adding tasks is cleared after a task is successfully added.

Constraints

Constraints & assumptions

  • You must use React for this implementation.
  • All state management should be handled client-side using React's built-in state hooks (e.g., useState). No external state management libraries are required or expected.
  • Assume task titles are simple strings and do not require validation beyond being non-empty.
  • Task IDs should be unique. You can generate simple unique IDs (e.g., using Date.now() or a counter).
  • Focus on functionality; basic styling is sufficient to make the UI usable and readable.

Out of scope

  • Drag-and-drop functionality for tasks.
  • Moving tasks between different Kanban columns.
  • Editing existing task titles.
  • Persistence of tasks (e.g., using local storage, API calls).
  • Complex error handling or extensive input validation.
  • Advanced accessibility features or responsive design for various screen sizes.

What interviewers evaluate

  • Correctness: Does the solution correctly implement adding and deleting tasks?
  • State Management: Is React state managed efficiently and appropriately for the UI updates?
  • Code Quality: Is the code clean, readable, well-structured, and does it follow React best practices?
  • UI/UX Implementation: Is the user interface functional and intuitive for the specified tasks?

Loading editor...