Build a Flight Search Result Skeleton Loader
At MakeMyTrip, providing a seamless user experience is paramount. When users search for flights, it can take a few moments for the actual flight data to load. Instead of showing a blank screen, displaying a visual placeholder, known as a skeleton loader, significantly improves perceived performance and keeps users engaged. This problem challenges you to implement such a skeleton loader for a simplified flight search result card.
Your primary task is to create a FlightCardSkeleton component that mimics the structure of a typical flight search result card. This skeleton should be displayed when data is loading and then replaced by the actual FlightCard once the data is available.
FlightCardSkeleton component: Create a React component that visually represents the layout of a flight search result card using placeholder elements (e.g., rectangles, circles).FlightCardSkeleton and a mock FlightCard based on an isLoading prop or state.FlightCardSkeleton component is implemented and used.FlightCardSkeleton when isLoading is true, and a mock FlightCard when isLoading is false.Constraints
react-loading-skeleton) are allowed. Implement the animation purely with CSS.FlightCard when it's not loading.FlightCardSkeleton component is structured, its reusability, and separation of concerns.Loading editor...