FrontendArk

Master Frontend Interviews

  • Practice
  • Playground
  • Resource
Easy

Flight Booker

15 mins

Build a Flight Booker component in React that allows users to select departure and return dates for a flight.

Requirements:

  1. Render two date inputs: one for departure and one for return.
  2. The return date must always be the same or after the departure date.
  3. Show an error if the return date is before the departure date.
  4. Show a confirmation message when the booking is valid.
  5. Focus on functionality over styling.
  6. The component should work out-of-the-box in a live React preview (e.g., CodeSandbox/Sandpack).

Code Editor

React Component

00:00
Loading...

Live Preview

See your React component