A React application that displays a travel itinerary for Japan with a reusable Day component structure.
- Reusable Day Component: A modular component that can handle complex nested itinerary data
- Structured Data: All itinerary information is organized in a clean, maintainable data structure
- Responsive Design: Maintains the original styling with responsive behavior
- Nested Lists: Supports multiple levels of nested bullet points and sections
src/
├── components/
│ └── Day.js # Reusable day component
├── data/
│ └── itineraryData.js # Structured itinerary data
├── App.js # Main application component
├── index.js # React entry point
└── index.css # Styles (same as original)
The Day component accepts the following props:
dayNumber: Number for CSS class namingtitle: Main day title (e.g., "Day 1")date: Date stringsubtitle: Optional subtitleactivities: Array of main activities (can be strings or objects with nested items)sections: Array of sections with their own titles and activities
{
dayNumber: 1,
title: "Day 1",
date: "Monday March 18",
subtitle: "Chuo City",
activities: [
"Simple activity",
{
text: "Activity with sub-items",
subItems: [
"Sub-item 1",
"Sub-item 2"
]
}
],
sections: [
{
title: "Section Title",
activities: [
// Same structure as main activities
]
}
]
}-
Install dependencies:
npm install
-
Start the development server:
npm start
-
Open http://localhost:3000 to view it in the browser.
To add a new day to the itinerary:
- Open
src/data/itineraryData.js - Find the appropriate city in the
citiesarray - Add a new day object to the
daysarray following the structure above - The app will automatically render the new day
The app uses the same CSS as the original HTML version, maintaining the visual design while providing the benefits of React's component structure.
- Maintainable: Easy to add, remove, or modify days
- Reusable: The Day component can be used for other itineraries
- Scalable: Can easily add new features like filtering, search, or interactive elements
- Type Safe: Can be easily converted to TypeScript for better development experience